我在一台机器上有两个虚拟主机,它们的 IP 相同,我为其设置了 SSL 证书(具有 1 个备用主题名称)。这两个地址都被验证为正常工作,但在访问第二个站点的安全版本时出现 404 错误。第一个工作正常。我不确定这是 Apache 问题还是应用程序环境问题,或者两者兼而有之。以下是我如何设置虚拟主机的示例:
<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>
谁能帮我弄清楚为什么我在测试站点 2 上得到 404?