PDA

View Full Version : SSL setup question


stasiu
12-23-2004, 01:53 AM
Hello;
I have 2 ip addresses. One IP address I would like to use with NameBased Virtual hosting, hosting several sites on port 80. The other IP address I would like to use with an IP based Virtual Host for SSL (just 1 host on this second ip address). I want the SSL Domain to be like:
secure.mydomain.com (not just mydomain.com)

Question:
In the HowTo modssl instructions, would I have:
domainname=secure.mydomain.com
(key file would be secure.mydomain.com.key) ?

Is there anything specific I have to do when I order the certificate to make sure it's for the domain: secure.mydomain.com ?

Bottom line is:
I want https://secure.mydomain.com and not https://mydomain.com as my secure site.

Thank you

retep
12-23-2004, 02:36 AM
domainname=secure.mydomain.com: correct
key file would be secure.mydomain.com.key: correct (call it what you want, but that is the convention we're using in the howto, so it works).

You don't need to do anything special when ordering secure.mydomain.com. It is just a regular domain as far as the ssl company is concerned.

As you may know, the ssl cert only covers one, specific domain. i.e. secure.mydomain.com but not mydomain.com (it will work on the latter domain, but the user will get a popup warning).

Apache identifies which SSL cert to use based on the IP and port it receives the https request on. Since you normally leave the default port as is (443) that normally means you will use a separate IP for each ssl domain.

You can use the same IP you use for regular virtual hosts as you do for SSL virtual hosts.

I recommend that regular (port 80) virtual hosts listen on all IPs, port 80. i.e.:
<VirtualHost *:80>

The SSL virtual hosts are then setup as:
<VirtualHost someip:443>
</VirtualHost>

<VirtualHost someotherip:443>
</VirtualHost>