[plug] Debugging apache-ssl virtualhost certificates
bob
bob at fots.org.au
Fri Dec 31 18:21:17 WST 2004
Firstly, Happy New Year to all :).
I need some help please. I am trying to get apache-ssl to spit out different
ssl certs on a per virtualhost basis. I have the following ditties in the
config (which are in agreement with the docs)
<VirtualHost *>
DocumentRoot /var/www/hostname1
ServerName hostname1.com.au
ServerAlias www.hostname1.com.au
SSLEnable
SSLCertificateFile /etc/apache-ssl/hostname1.cert
SSLCertificateKeyFile /etc/apache-ssl/hostname1.key
</VirtualHost>
<VirtualHost *>
DocumentRoot /var/www/hostname2
ServerName hostname2.com.au
ServerAlias wwww.hostname2.com.au
SSLEnable
SSLCertificateFile /etc/apache-ssl/hostname2.cert
SSLCertificateKeyFile /etc/apache-ssl/hostname2.key
</VirtualHost>
The certs and keys having been created following the instructions in the
docs (and various other sources online)
openssl req -new > new.cert.csr
openssl rsa -in privkey.pem -out new.cert.key
openssl x509 -in new.cert.csr -out new.cert.cert -req -signkey new.cert.key
-days 365
SSLCertificateFile /path/to/certs/new.cert.cert
SSLCertificateKeyFile /path/to/certs/new.cert.key
The problem is that when I access hostname2 I get hostname1's certificate
(and it appears that this is consistant... through several iterations of
creating certs and keys and poking the config... the first cert found is
the only one served). Meanwhile the appropriate content is being served so
I'm pretty confident that the only thing broken is the ssl certs.
I am obviously not seeing something here :( - some pointers on how to go
about debugging this would be appreciated :).
Thanks.
--
Who's scruffy-looking?
-- Han Solo
More information about the plug
mailing list