I have two virtual hosts on a machine with the same IP that I set up an SSL Certificate for (with 1 alternate subject name). Both of the addresses are verified as working properly, but I get a 404 error when accessing the secure version of the second site. The first one works fine. I'm not sure if this is an Apache issue or an application environment issue, or both. Here are the examples of how I have my virtual hosts set up:
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/testsite1"
ServerName testsite1.com:443
ErrorLog logs/error_log
TransferLog logs/access_log
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
RewriteEngine On
RedirectMatch ^/$ https://www.testsite1.com/apps/survey
<IfModule mod_weblogic.c>
MatchExpression / WebLogicHost=web01|WebLogicPort=8030|Debug=On
</IfModule>
SSLEngine on
/// SSL Cert configurations
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected]
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/testsite2"
ServerName www.testsite2.com:443
ErrorLog logs/error_log
TransferLog logs/access_log
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
RewriteEngine On
RedirectMatch ^/$ https://www.testsite2.com/rpower
<IfModule mod_weblogic.c>
MatchExpression / WebLogicHost=web01|WebLogicPort=8030|Debug=On
</IfModule>
SSLEngine on
/// SSL Cert configurations
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>
Can anyone help me figure out why I am getting a 404 on test site 2?
Turns out this was an Apache version problem. We had an old version on the server (pre-2.2) which did not support virtual hosts apparently, at least not with the alternate subject name. Once we upgraded to 2.2.2x it worked fine.