简体   繁体   English

Apache SSL虚拟主机404

[英]Apache SSL Virtual Host 404

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). 我在一台机器上有两个虚拟主机,它们具有与我为其设置SSL证书的IP相同的IP(带有1个备用使用者名称)。 Both of the addresses are verified as working properly, but I get a 404 error when accessing the secure version of the second site. 这两个地址均已验证正常运行,但是访问第二个站点的安全版本时出现404错误。 The first one works fine. 第一个工作正常。 I'm not sure if this is an Apache issue or an application environment issue, or both. 我不确定这是Apache问题还是应用程序环境问题,或者两者都是。 Here are the examples of how I have my virtual hosts set up: 以下是我如何设置虚拟主机的示例:

<VirtualHost *:443>
    ServerAdmin testymctesterson@test.com
    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 testymctesterson@test.com
    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上收到404吗?

Turns out this was an Apache version problem. 原来这是Apache版本的问题。 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. 我们在服务器上使用的是旧版本(2.2之前的版本),该版本显然不支持虚拟主机,至少不支持备用主题名称。 Once we upgraded to 2.2.2x it worked fine. 一旦我们升级到2.2.2x,它就可以正常工作。

What if Im doing a SSL because I need a redirect URI thats https:// so I have this in my xamp apache httpd 如果我做SSL是因为我需要一个https://的重定向URI,那么我在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 DocumentRoot“ C:/ x / htdocs / project-lara / public” ServerName fuseuca.com DocumentRoot“ C:/ x / htdocs / project-lara / public” ServerName fuseuca.com SSLCertificateFile上的SSLEngine“ conf / ssl.crt / server”。 crt“ SSLCertificateKeyFile” conf / ssl.key / server.key“ AllowOverride All Order允许,拒绝从所有DocumentRoot允许“ C:/ x / htdocs / project-lara / public” ServerName fuseuca.com AllowOverride All Order允许,拒绝所有

I also configured the hosts 127.0.0.1 fuseuca.com 我还配置了主机127.0.0.1 fuseuca.com

but i still get Web page not available Error code: ERR_CONNECTION_REFUSED 但是我仍然无法获得网页错误代码:ERR_CONNECTION_REFUSED

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM