0

I have recently purchased a Wildcard SSL Certificate for my domain, however I am having difficulty configuring it within Apache. My server has one dedicated IP address, so I have read that you need to reference the IP address in the Virtualhost. My config looks like this:

<VirtualHost 172.16.0.3:443>
 ServerName appstore.mydomain.org.uk
 DocumentRoot /home/appstore/public_html
 <Directory "/home/appstore/public_html">
     allow from all
     Options +Indexes
 </Directory>
 SSLEngine on
 SSLCertificateFile /home/appstore/certs/mydomain.org.uk.crt
 SSLCertificateKeyFile /home/appstore/certs/mydomain.org.uk.key
 SSLCertificateChainFile /home/appstore/certs/gs_intermediate_ca.crt
</VirtualHost>

<VirtualHost 172.16.0.3:443>
 ServerName blog.mydomain.org.uk
 DocumentRoot /home/blog/public_html
 <Directory "/home/blog/public_html">
      Allow from all
      Options +Indexes
 </Directory>
 SSLEngine on
 SSLCertificateFile /home/appstore/certs/mydomain.org.uk.crt
 SSLCertificateKeyFile /home/appstore/certs/mydomain.org.uk.key
 SSLCertificateChainFile /home/appstore/certs/gs_intermediate_ca.crt
</VirtualHost>

This works fine when I browse to the first domain, but when I go to the second, the first domain is displayed. What am I doing wrong?

Thanks in advance.

amburnside
  • 131
  • 5
  • Do you have `NameVirtualHost` (http://httpd.apache.org/docs/2.2/vhosts/name-based.html) enabled for it? – faker Oct 23 '14 at 15:33
  • Yes. I have: NameVirtualHost *:80 NameVirtualHost 172.16.0.3:443 – amburnside Oct 23 '14 at 15:37
  • 1
    Possible duplicate of [Multiple SSL domains on the same IP address and same port?](http://serverfault.com/questions/109800/multiple-ssl-domains-on-the-same-ip-address-and-same-port) – Jenny D Feb 04 '16 at 10:02

0 Answers0