Forum Moderators: phranque

Message Too Old, No Replies

secure and non secure help needed

         

vbsaltydog

10:09 pm on Mar 30, 2006 (gmt 0)

10+ Year Member



Hey everyone. I have an apache2 installation on CentOS 4.2 and several virtual domains on a single ip.
I installed mod_ssl and everything seems fine. If I go to any of my current sites using the https: prefix it sends me to the default apache welcome page which I am assuming is due to the global settings in ssl.conf

Now I got a secure certificate for one of my domains and I want to use it to secure the domain but I also want a non secure version of the same domain.

Ex. I want

[exampledomain.com...] and
[exampledomain.com...]

Can anyone who has done this give a bit of help?

Thanks to all,

-vbsaltydog

ChadSEO

11:22 pm on Mar 30, 2006 (gmt 0)

10+ Year Member



vbsaltydog,

You have to setup a special VirtualHost on port 443 for SSL. One thing I learned the hard way: SSL operates on a different layer than rest of the HTTP traffic, so a single IP address can only host one secure site. No named-based virtual hosting for SSL :( If you only want to do it for the one domain though, just copy the DocumentRoot and any other settings from the VirtualHost into the SSL one. Hopefully I'm not being to obscure...

Chad

vbsaltydog

12:04 am on Mar 31, 2006 (gmt 0)

10+ Year Member



Not obscure at all. In fact, I have hosted several ssl sites on IIS servers in the past but I always used a different domain.

Example

[domain.com...] and
[secure.domain.com...]

The only difference now is that I am on apache and am trying to use the same URL only 1 as http and 1 as https that both go to the same site.

You are saying to copy my virtual domain container in httpd.conf and paste it again so there are two identical containers and then set one to :80 ad the other to :443

Is that about right?

ChadSEO

2:51 pm on Mar 31, 2006 (gmt 0)

10+ Year Member



vbsaltydog,

Yup, that's exactly what you have to do. The VirtualHost container for the SSL connection does need additional information, such as the location of the certificate, etc., but if you include ServerName, ServerAlias, DocumentRoot, LogFile (optional), ServerAdmin (optional), etc., it should appear exactly like the non-SSL version.

Chad

vbsaltydog

5:56 pm on Mar 31, 2006 (gmt 0)

10+ Year Member



Thank you for the help. Your advise was almost perfect. The only thing you were off on was that the secure virtual host container must be in the ssl.conf vs. the httpd.conf in my particular situation. Other than that, you were right on the money.

Thanks for the assitance with this.

-vbsaltydog