View previous topic :: View next topic |
Author |
Message |
salam Apprentice
Joined: 29 Sep 2005 Posts: 227
|
Posted: Wed Jan 25, 2006 8:04 pm Post subject: apache2 ssl & virtualhosts - more certificates setup |
|
|
I have a domain (for example domain.tld) and one subdomain called mail.domain.tld (both on the same machine, so one IP for both)
I'd like to use a different ssl certificate for each (to get rid of warning about server name mismatch). How can I do this? I have a ssl virtualhost and it is working OK except for the certificate part(it ignores certs in its declaration and uses default ones)
here is the ssl vhost configuration for mail subdomain:
Code: | <VirtualHost *:443>
DocumentRoot "/var/www/localhost/htdocs/squirrelmail"
ServerName mail.domain.tld
ServerAdmin www@domain.tld
ErrorLog logs/ssl_error_log
<IfModule mod_log_config.c>
TransferLog logs/ssl_access_log
</IfModule>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/domain-mail-cert.pem
SSLCertificateKeyFile /etc/apache2/domain-mail-key.pem
<Files ~ "\.(cgi|shtml|phtml|php?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/localhost/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
<IfModule mod_setenvif.c>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</IfModule>
<IfModule mod_log_config.c>
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteOptions inherit
</IfModule>
</VirtualHost> |
this is placed under a default vhost in file 41_mod_ssl.default-vhost.conf
this is ssl part of the default virtualhost:
Code: | SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/domain-cert.pem
SSLCertificateKeyFile /etc/apache2/ssl/domain-key.pem |
as it does not work and i still get a default certificate instead of a mail one when i contact https://mail.domain.tld, it is clear that i did something wrong. but i have no idea what. do you have any experience with setting up a different certificate for each apache virtualhost? |
|
Back to top |
|
|
jtaylor72 Apprentice
Joined: 01 Feb 2004 Posts: 197 Location: "the can", WA
|
Posted: Wed Jan 25, 2006 9:09 pm Post subject: |
|
|
As far as I know, you can only have one certificate per IP Address. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|