Apache + SSL + multiple domains
Hi there,
I'm running Squeeze 6.0.4 up-to-date with apache. My problem is that
when using more than one SSL host, only first one is recognized i.e.
when connecting to second url, content of first one is shown. Here's my
config -
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
NameVirtualHost *:443
Listen 443 https
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
<VirtualHost subdomain1.domain.com:443>
ServerAdmin webmaster@localhost
ServerName subdomain1.domain.com
DocumentRoot /var/www/subdomain1.net/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www//www/fotoluzt.net/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/domain.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/domain.com.key
SSLStrictSNIVHostCheck On
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost subdomain2.domain.com:443>
ServerAdmin webmaster@localhost
ServerName subdomain2.domain.com
DocumentRoot /var/www/domain.com/subdomain2/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/domain.com/subdomain2/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/subdomain2.domain.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/subdomain2.domain.com.key
SSLStrictSNIVHostCheck On
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
PS - using <VirtualHost *:443> doesn't work at all for me
PS II - I can workaround this by using different port for each SSL host,
but there has to be way around this
PS III - normal http hosts work perfectly fine with <VirtualHost *:80>
Would you have any idea what could be the problem?
thanks & cheers
Reply to: