Hello, I"m a newbie to apache and my apache is Apache/1.3.37 and running on Fedora Core 6 64bit. I have installed all necessary .crt files and my website is running fine. However, https://www.mydomain.com does not work, but https://myipaddress works (i.e. https://192.168.0.1). I know I'm missing something on httpd.conf but I cannot find it. Here is virtual host part of my httpd.conf. This is only one website is running on my webserver. Please some one advise. Thank you. NameVirtualHost 192.168.0.1:80 <VirtualHost 192.168.0.1:80> ServerName mydomain.com ServerAlias www.mydomain.com ServerAdmin webmaster@mydomain.com DocumentRoot /home/mydomain/public_html <IfModule mod_suphp.c> suPHP_UserGroup webs webs </IfModule> <IfModule !mod_disable_suexec.c> User webs Group webs </IfModule> BytesLog /usr/local/apache/domlogs/mydomain.com-bytes_log CustomLog /usr/local/apache/domlogs/mydomain.com combined ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/ </VirtualHost> <IfDefine SSL> <VirtualHost 192.168.0.1:443> ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /home/mydomain/public_html ServerAdmin webmaster@mydomain.com UseCanonicalName off UserDir public_html <IfModule mod_suphp.c> suPHP_UserGroup webs webs </IfModule> <IfModule !mod_disable_suexec.c> User webs Group webs </IfModule> BytesLog /usr/local/apache/domlogs/mydomain.com-bytes_log ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/ SSLEngine on SSLCertificateFile /etc/ssl/certs/mydomain.com.crt SSLCertificateKeyFile /etc/ssl/private/mydomain.com.key SSLCACertificateFile /etc/ssl/certs/mydomain.com.cabundle SSLLogFile /usr/local/apache/domlogs/mydomain.com-ssl_data_log CustomLog /usr/local/apache/domlogs/mydomain.com-ssl_log combined SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown </VirtualHost> </IfDefine> Code (markup):
Change your to , and this will work. The reason you have it working for your http website is because of the NameVirtualHost 192.168.0.1:80, which basically tells your Apache to listen for any requests at port 80 (standard http port) and to then pick the vitualhost based on the hostname. You can't have NameVirtualHost for SSL websites, there can only be one host with :443 port in the standard Apache configuration. Good luck!
You can have more than one :443 virtual host in the same apache config just as long as they don't share the same IP address.
Theres actually a mod (mod_gnutils I believe) that allows you to have multiple SSL enabled domains on a single IP (using NameVirtualHost). It actually works (because I've used it), so you may want to give it a try (not 100% compatible with all browsers, mind). Jay
One would still need to buy multiple SSL certificates even if the same IP is used for SSL, yes? That's my biggest issue with SSL...having to buy a separate certificate for each domain...it kinda sucks spending the kind of money it takes to SSL several sites.
from what I understand if you use NamVirtualHost you still get a ssl connection, but your browser will throw a dns error.