Having some trouble getting SSL working on my server. I only need it for one of my two domains on this box. I have two IPs, and I am using A records on my DNS to point the domains to the different IPs.
Here is my httpd.conf:
NameVirtualHost XX.XX.XXX.X1:80
NameVirtualHost XX.XX.XXX.X2:80
NameVirtualHost XX.XX.XXX.X2:443
<VirtualHost XX.XX.XXX.X1:80>
ServerName domain1.com
ServerAlias .*
WSGIScriptAlias / /home/domain1/domain1.wsgi
</VirtualHost>
<VirtualHost XX.XX.XXX.X2:80>
ServerName domain2.me
DocumentRoot /var/www/domain2
</VirtualHost>
<VirtualHost XX.XX.XXX.X2:443>
ServerName www.domain2.me
DocumentRoot /var/www/domain2
ServerAdmin [email protected]
SSLEngine ON
SSLCertificateFile /etc/apache2/ssl/domain2.me.ssl/domain2.me.crt
SSLCertificateKeyFile /etc/apache2/ssl/domain2.me.ssl/domain2.me.key
SSLCACertificateFile /etc/apache2/ssl/domain2.me.ssl/gd_bundle.crt
</VirtualHost>
Hope something obviously wrong jumps out. Here are links to two gists with other configs I've tried. the first just tries to use the snakeoil cert that comes with apache:
Another failed attempt similar to the one posted here
Basically what happens is that I get a "Page not available" when I pull up https://www.domain2.me.
Thanks in advance.
UPDATE: The issue was iptables not configured to accept traffic on port 443. I am accepting EightBitTony's answer since his config worked perfectly once I fixed my iptables.
apache2ctl -S
?