I have apache serve setup with example domains domain1.com and domain2.comMy ssl.conf (etc/apache2/modes-enabled/ssl.conf)NameVirtualHost *:443<VirtualHost 172.17.0.122:443>ServerAdmin info@domain1.comDocumentRoot /var/www/domain1.com/htdocsServerName domain1.com:443SSLEngine OnSSLProtocol allSSLCertificateFile    /var/ssl/domain1/domain1.crtSSLCertificateKeyFile /var/ssl/domain1.keySSLCertificateChainFile /var/ssl/intermediate.crt</VirtualHost><VirtualHost 172.17.0.123:443>ServerAdmin info@domain2.comDocumentRoot /var/www/domain2.com/htdocs/ServerName domain2.com:443SSLEngine OnSSLProtocol allSSLCertificateFile    /var/ssl/domain2/domain2.crtSSLCertificateKeyFile /var/ssl/domain2.keySSLCertificateChainFile /var/ssl/intermediate.crt</VirtualHost>domain1 works fine with http and https, domain2 works only with http, since domain2 https shows domain1 page... I have 2 ips on server.VirtualHost (etc/apache2/sites-enabled/domain1.com) for domain1: <VirtualHost *>        ServerAdmin info@domain1.com       ServerName  www.domain1.com        ServerAlias domain1.com    # Indexes + Directory Root.    DirectoryIndex index.php    DocumentRoot /var/www/domain1.com/htdocs/    # CGI Directory    ScriptAlias /cgi-bin/ /var/www/domain1.com/cgi-bin/    <Location /cgi-bin>            Options +ExecCGI    </Location>    # Logfiles    ErrorLog  /var/www/domain1.com/logs/error.log    CustomLog /var/www/domain1.com/logs/access.log combined</VirtualHost>apache2ctl -S shows: VirtualHost configuration: 172.17.0.122:443 www.domain1.com (/etc/apache2/mods-enabled/ssl.conf:77) wildcard NameVirtualHosts and _default_ servers: *:* is a NameVirtualHost default server www.domain3.com (/etc/apache2/sites-enabled/domain3.com:1) port * namevhost www.domain3.com (/etc/apache2/sites-enabled/domain3.com:1)port * namevhost www.domain2.com (/etc/apache2/sites-enabled/domain2.com:1)port * namevhost www.domain1.com (/etc/apache2/sites-enabled/domain1.com:1)this is with config that shows domain1 https corectly
Apache 2 certs on different domains
apache httpd;ssl;apache virtualhost