How do you setup a single Apache2 config to host multiple HTTPS sites each on their own IP address? There will also be multiple HTTP sites on just a single IP address.
I do not want to use Server Name Indication (SNI) as described here, and I'm only concerned with the important top-level Apache directives. That is, I just need to know the skeleton of how my config should look.
The basic setup looks like this:
Hosted on 220.127.116.11:80 (HTTP) - example.com - example.net - example.org Hosted on 18.104.22.168:443 (HTTPS) - secure.com Hosted on 22.214.171.124:443 (HTTPS) - secure.net Hosted on 126.96.36.199:443 (HTTPS) - secure.org
And here are the important config directives I have so far, which is the closest I've come to a working iteration, but still no dice. I know I'm close, just need a little push in the right direction.
Listen 188.8.131.52:80 Listen 184.108.40.206:443 Listen 220.127.116.11:443 Listen 18.104.22.168:443 NameVirtualHost 22.214.171.124:80 NameVirtualHost 126.96.36.199:443 NameVirtualHost 188.8.131.52:443 NameVirtualHost 184.108.40.206:443 # HTTP VIRTUAL HOSTS: <VirtualHost 220.127.116.11:80> ServerName example.com DocumentRoot /home/foo/example.com </VirtualHost> <VirtualHost 18.104.22.168:80> ServerName example.net DocumentRoot /home/foo/example.net </VirtualHost> <VirtualHost 22.214.171.124:80> ServerName example.org DocumentRoot /home/foo/example.org </VirtualHost> # HTTPS VIRTUAL HOSTS: <VirtualHost 126.96.36.199:443> ServerName secure.com DocumentRoot /home/foo/secure.com SSLEngine on SSLCertificateFile /home/foo/ssl/secure.com.crt SSLCertificateKeyFile /home/foo/ssl/secure.com.key SSLCACertificateFile /home/foo/ssl/ca.txt </VirtualHost> <VirtualHost 188.8.131.52:443> ServerName secure.net DocumentRoot /home/foo/secure.net SSLEngine on SSLCertificateFile /home/foo/ssl/secure.net.crt SSLCertificateKeyFile /home/foo/ssl/secure.net.key SSLCACertificateFile /home/foo/ssl/ca.txt </VirtualHost> <VirtualHost 184.108.40.206:443> ServerName secure.org DocumentRoot /home/foo/secure.org SSLEngine on SSLCertificateFile /home/foo/ssl/secure.org.crt SSLCertificateKeyFile /home/foo/ssl/secure.org.key SSLCACertificateFile /home/foo/ssl/ca.txt </VirtualHost>
For what it's worth, I prefer to have each of my SSL sites on their own IP instead of including one of them on the primary VHOST IP. Any links which show a standard setup would be more than welcome!