Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Apache 2.0 -- Trouble with Virtual hosts + SSL

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Virtual hosts and SSL? - Hello I'm trying to setup this apache 1.3 server for virtual hosts, with ssl. I've got the normal port 80 working, but the SSL is a bit of a mess. If I have the SSL pages in the real part of the server, ie, then..

Virtual Hosts? - I'm wanting to use one IP address to host multiple domains, ie web hosting. I assume that are the thin I need to focus on here and is this basically a similar concept to Host Headers in IIS 5.0? I'm running Windows 2000 with Apache 2.0.46 ..

local virtual hosts - i've read many posts about this subject, but none have been exactly what i'm looking for. I have Apache 2.0.46 running Redhat 9. This PC along with 3 others are on a Dl-614+ router. I want to use the redhat machine as a server for several..

Virtual Hosts :: logs - Hey all- I have apache 2.0.46 running the following virtual hosts, plus a few more: *> *> awhc.org

Configuring virtual hosts on an intranet - I have seen how to configure virtual hosts by name when a server in connected to the internet. But can it be done when working in an intranet and you don't have DNS and you normally enter I would like to give a couple of people in a..
Next:  Apache: Apache proxypass on RH 9  
Author Message
moreno_at_moch

External


Since: Jul 24, 2003
Posts: 3



(Msg. 1) Posted: Thu Jul 24, 2003 11:27 pm
Post subject: Apache 2.0 -- Trouble with Virtual hosts + SSL
Archived from groups: alt>apache>configuration (more info?)

I'm having a hard time making HTTPS work on a RedHat 9 server,
running apache 2.0.40-21.3

I'm talking about an *actual* server (and not an exercise I'm
doing on my home machine). I got a GeoTrust certificate, but
there simply is no way that I can make it work.

I already succeeded in setting up multiple virtual hosts (same
IP, different domain names). Then, I want the name
secure.mydomain.com to be used as the secure host, so I edited
the default /etc/httpd/conf.d/ssl.conf file and put the following:



<VirtualHost _default_:443>

# With the actual IP instead of _default_, I get an error message
# when running apachectl startssl


# General setup for the virtual host
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log


ServerAdmin admin.TakeThisOut@mydomain.com
DocumentRoot /home/websites/secure.mydomain.com
ScriptAlias /cgi-bin/ "/home/websites/secure.mydomain.com/cgi-bin/"
ServerName secure.mydomain.com:443

# I tried with and without the above lines (putting them in the
# VirtualHost block in the httpd.conf file). Same result Sad

SSLCertificateFile /etc/httpd/conf/mydomain.com.crt
SSLCertificateKeyFile /etc/httpd/conf/mydomain.com.key




# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on


.....

And the rest is pretty much unchanged.

I run apachectl stop, then apachectl startssl, and they run
without error messages. But the HTTPS part does not work; I
get this output from a wget command:

[root]# wget https://secure.mydomain.com/index.html
--19:44:26-- https://secure.mydomain.com/index.html
=> `index.html'
Resolving secure.mydomain.com... done.
Connecting to secure.mydomain.com[xx.xx.xx.xx]:443... connected.

Unable to establish SSL connection.

Unable to establish SSL connection.


(I manually modified the actual domain name, and the actual IP
address; but otherwise, this is copy-n-pasted output from the
command).

If I try from the browser (Mozilla), I get a dialog box saying
"Connection refused when attempting to contact secure.mydomain.com"

If I point the browser (or wget) to: http://secure.mydomain.com
(i.e., http instead of https), then I get the right index.html
file (the one corresponding to that domain name).

The certificate files are in the right place, owned by root with
permission 600. I temporarily changed the permissions to 644, but
it makes no difference. (all the directories in the path have
permission XX5 -- i.e., others always have read and execute
permission for all the directories in the path to the certificate
files)

What am I missing, or doing wrong?

BTW, the module mod_ssl is being loaded, and the right config
file is being read -- I tried putting a deliberate error, and
apachectl startssl reports it)

Thanks for any help/pointers,

Carlos
--

 >> Stay informed about: Apache 2.0 -- Trouble with Virtual hosts + SSL 
Back to top
Login to vote
clbowie

External


Since: Jul 29, 2003
Posts: 2



(Msg. 2) Posted: Tue Jul 29, 2003 10:49 pm
Post subject: Re: Apache 2.0 -- Trouble with Virtual hosts + SSL [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You might try logging in as root and using "service httpd restart"
in order to restart the whole apache server.
if that does not work put your IP address providing it is static in place of
_default_ on the VirtualHost line.

If that does not work make sure that the SSL port is open and accessible
through a possible firewall (443). use "nmap <SERVER NAME> and see if it
lists SSL 443.
if not the reconfigure the firewall or add "Listen 443" to your VirtualHost
Block


"Carlos Moreno" <moreno_at_mochima_dot_com.TakeThisOut@xx.xxx> wrote in message
news:rR_Ta.6515$MS5.126400@wagner.videotron.net...
 > I'm having a hard time making HTTPS work on a RedHat 9 server,
 > running apache 2.0.40-21.3
 >
 > I'm talking about an *actual* server (and not an exercise I'm
 > doing on my home machine). I got a GeoTrust certificate, but
 > there simply is no way that I can make it work.
 >
 > I already succeeded in setting up multiple virtual hosts (same
 > IP, different domain names). Then, I want the name
 > secure.mydomain.com to be used as the secure host, so I edited
 > the default /etc/httpd/conf.d/ssl.conf file and put the following:
 >
 >
 >
 > <VirtualHost _default_:443>
 >
 > # With the actual IP instead of _default_, I get an error message
 > # when running apachectl startssl
 >
 >
 > # General setup for the virtual host
 > ErrorLog logs/ssl_error_log
 > TransferLog logs/ssl_access_log
 >
 >
 > ServerAdmin admin.TakeThisOut@mydomain.com
 > DocumentRoot /home/websites/secure.mydomain.com
 > ScriptAlias /cgi-bin/ "/home/websites/secure.mydomain.com/cgi-bin/"
 > ServerName secure.mydomain.com:443
 >
 > # I tried with and without the above lines (putting them in the
 > # VirtualHost block in the httpd.conf file). Same result Sad
 >
 > SSLCertificateFile /etc/httpd/conf/mydomain.com.crt
 > SSLCertificateKeyFile /etc/httpd/conf/mydomain.com.key
 >
 >
 >
 >
 > # SSL Engine Switch:
 > # Enable/Disable SSL for this virtual host.
 > SSLEngine on
 >
 >
 > ....
 >
 > And the rest is pretty much unchanged.
 >
 > I run apachectl stop, then apachectl startssl, and they run
 > without error messages. But the HTTPS part does not work; I
 > get this output from a wget command:
 >
<font color=purple> > [root]# wget <a style='text-decoration: underline;' href="https://secure.mydomain.com/index.html</font" target="_blank">https://secure.mydomain.com/index.html</font</a>>
<font color=purple> > --19:44:26-- <a style='text-decoration: underline;' href="https://secure.mydomain.com/index.html</font" target="_blank">https://secure.mydomain.com/index.html</font</a>>
 > => `index.html'
 > Resolving secure.mydomain.com... done.
 > Connecting to secure.mydomain.com[xx.xx.xx.xx]:443... connected.
 >
 > Unable to establish SSL connection.
 >
 > Unable to establish SSL connection.
 >
 >
 > (I manually modified the actual domain name, and the actual IP
 > address; but otherwise, this is copy-n-pasted output from the
 > command).
 >
 > If I try from the browser (Mozilla), I get a dialog box saying
 > "Connection refused when attempting to contact secure.mydomain.com"
 >
<font color=purple> > If I point the browser (or wget) to: <a style='text-decoration: underline;' href="http://secure.mydomain.com</font" target="_blank">http://secure.mydomain.com</font</a>>
 > (i.e., http instead of https), then I get the right index.html
 > file (the one corresponding to that domain name).
 >
 > The certificate files are in the right place, owned by root with
 > permission 600. I temporarily changed the permissions to 644, but
 > it makes no difference. (all the directories in the path have
 > permission XX5 -- i.e., others always have read and execute
 > permission for all the directories in the path to the certificate
 > files)
 >
 > What am I missing, or doing wrong?
 >
 > BTW, the module mod_ssl is being loaded, and the right config
 > file is being read -- I tried putting a deliberate error, and
 > apachectl startssl reports it)
 >
 > Thanks for any help/pointers,
 >
 > Carlos
 > --
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache 2.0 -- Trouble with Virtual hosts + SSL 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]