I am attempting to run multiple SSL connections off a single IP server running RHEL6. I have successfully configured one domain on SSL, however when I attempt to add a second, Apache fails to restart. Commenting out the first domain, so that only the new one is running does not resolve the problem.
My config is as follows:
NameVirtualHost *:80
NameVirtualHost 192.168.0.10:443
# Domain 1 Works fine
<VirtualHost 192.168.0.10:443>
ServerName domain1.org.uk
DocumentRoot /home/domain1/public_html
<Directory "/home/domain1/public_html">
allow from all
Options FollowSymLinks
</Directory>
SSLEngine on
SSLCertificateFile /home/domain1/certs/domain1.org.uk.crt
SSLCertificateKeyFile /home/domain1/certs/domain1.org.uk.key
SSLCertificateChainFile /home/domain1/certs/gs_intermediate_ca.crt
</VirtualHost>
# Domain 2 kills apache
<VirtualHost 192.168.0.10:443>
ServerName domain2.org.uk
DocumentRoot /home/domain2/public_html
<Directory "/home/domain2/public_html">
allow from all
Options FollowSymLinks
</Directory>
SSLEngine on
SSLCertificateFile /home/domain2/certs/domain2.org.uk.crt
SSLCertificateKeyFile /home/domain2/certs/domain2.org.uk.key
SSLCertificateChainFile /home/domain2/certs/gs_intermediate_ca.crt
</VirtualHost>
When looking at the /var/log/httpd/error_log I get this when I restart apache when turning on SSL for domain 2
[notice] caught SIGTERM, shutting down]
[notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
When looking at /var/log/httpd/ssl_error_log
[error] Failed to configure CA certificate chain
If I change the line for the chain certificate from SSLCertificateChainFile to SSLCACertificateFile apache restarts without incident, but when I visit domain2 in any browser I get an SSL connection error.
Any help would be much appreciated.
Edit
Ok two things:
1.) Have enabled second network card and HTTPS listens on 192.168.0.11 and http on 192.168.0.10
2.) Have ran:
openssl verify -verbose -purpose sslserver -CAfile gs_intermediate_ca.crt domain2.org.uk.crt
unable to load certificate
and I now get
unable to load certificate
140685974771528:error:0906D066:PEM routines:PEM_read_bio:bad end line:pem_lib.c:802: