I tried to startup 2 SSL virtual hosts (every virtual host has it's own cert) on the same machne with 1 IP. Apparently it looks fine...
AFAIK this configuration is not possible, because vhost (http/1.1 ...) negotiation is AFTER SSL handshake, and there is no way around this. You need two ip addresses to configure this properly.
OK. I have 2 IPs (eth0 eth0:1). Both works.
When I connect to https://eth0.ip.address/ I get cert dedicated for
name.domain-eth0.com.
When I connect to https://eth0:1.ip.address/ I get cert dedicated for
name.domain-eth0:1.com.
Looks good.
But when I connect to https://name.domain-eth0:1.com/ i get pages which
should be for https://name.domain-eth0.com/ not for
https://name.domain-eth0:1.com/. Cert is for
https://name.domain-eth0.com/ too.
DNS records are OK.
/etc/httpd.conf (fragment)
------------------------------------------------------------------------
<VirtualHost eth0:1.ip.address:443>
DocumentRoot "/srv/www/domain-eth0:1"
ServerName name.domain-eth0:1.com
ServerAdmin dominik.skladanowski@ch.pw.edu.pl
ErrorLog /var/log/httpd/error_log
TransferLog /var/log/httpd/access_log
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/httpd/domain-eth0:1cert.pem
SSLCertificateKeyFile /etc/httpd/domain-eth0:1req.pem
SSLCACertificatePath /usr/share/ssl/misc/demoCA
SSLCACertificateFile /usr/share/ssl/misc/demoCA/cacert.pem