Apache SSL Virtual Host 404

1.8k views Asked by At

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?

2

There are 2 answers

0
jwBurnside On BEST ANSWER

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.

0
Kristine Joanne Tigue On

What if Im doing a SSL because I need a redirect URI thats https:// so I have this in my xamp apache httpd

DocumentRoot "C:/x/htdocs/project-lara/public" ServerName fuseuca.com DocumentRoot "C:/x/htdocs/project-lara/public" ServerName fuseuca.com SSLEngine on SSLCertificateFile "conf/ssl.crt/server.crt" SSLCertificateKeyFile "conf/ssl.key/server.key" AllowOverride All Order allow,deny Allow from all DocumentRoot "C:/x/htdocs/project-lara/public" ServerName fuseuca.com AllowOverride All Order allow,deny Allow from all

I also configured the hosts 127.0.0.1 fuseuca.com

but i still get Web page not available Error code: ERR_CONNECTION_REFUSED