【问题标题】:sites displayed perfectly in browser except IE 6网站在浏览器中完美显示,除了 IE 6
【发布时间】:2019-04-01 09:49:00
【问题描述】:

我偶然发现了一个错误,我将 apache httpd 配置为虚拟主机作为反向代理,这是我的虚拟主机:

<VirtualHost *:80>
ServerName example2.com

ErrorDocument 404 /404.html
ErrorDocument 503 /503.html
ErrorDocument 401 /401.html

###redirect permanent####
Redirect permanent / https://example2.com/
</VirtualHost>

<VirtualHost _default_:443>
ServerName example2.com

DocumentRoot /var/www/proxyhost/public_html

ErrorLog /var/log/httpd/proxyhost_ssl_error.log
CustomLog /var/log/httpd/proxyhost_ssl_requests.log combined

SSLEngine on
SSLCertificateFile      /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key

BrowserMatch "MSIE [2-8]" nokeepalive downgrade-1.0 force-response-1.0

RewriteEngine on
RewriteRule ^/test1$ /test1/ [R]
RewriteRule ^/test2$ /test2/ [R]

ProxyPass /test1/ ajp://host1:8009/test/
ProxyPassReverse /test1/ ajp://host1:8009/test/
ProxyPass /test2/ ajp://host2:8009/test2/
ProxyPassReverse /test2/ ajp://host2:8009/test2/

ProxyPreserveHost On
ErrorDocument 404 /404.html
ErrorDocument 503 /503.html
ErrorDocument 401 /401.html
</VirtualHost>


<Directory /var/www/proxyhost/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

问题是,使用上面的配置非常适合 chrome 和 firefox 等浏览器。但是,当我尝试在 win server 2003 上使用旧 IE 6 访问网络时,无法加载该页面。我尝试使用http(注释重定向功能)和https访问,没有任何显示。

这是错误日志

[Sun Oct 28 13:23:32.502672 2018] [alias:warn] [pid 22755] AH00671: The Alias directive in /etc/httpd/directory-enabled/DIR_BRI.conf at line 1 will probably never match because it overlaps an earlier Alias.
[Sun Oct 28 13:23:32.502679 2018] [alias:warn] [pid 22755] AH00671: The Alias directive in /etc/httpd/directory-enabled/DIR_BTN.conf at line 1 will probably never match because it overlaps an earlier Alias.
[Sun Oct 28 13:23:32.502685 2018] [alias:warn] [pid 22755] AH00671: The Alias directive in /etc/httpd/directory-enabled/DIR_MANDIRI.conf at line 1 will probably never match because it overlaps an earlier Alias.
[Sun Oct 28 13:23:32.503602 2018] [auth_digest:notice] [pid 22755] AH01757: generating secret for digest authentication ...
[Sun Oct 28 13:23:32.504221 2018] [lbmethod_heartbeat:notice] [pid 22755] AH02282: No slotmem from mod_heartmonitor
[Sun Oct 28 13:23:32.505594 2018] [ssl:warn] [pid 22755] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Sun Oct 28 13:23:32.507996 2018] [mpm_prefork:notice] [pid 22755] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Sun Oct 28 13:23:32.508016 2018] [core:notice] [pid 22755] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

有解决问题的建议吗?因为我无权强迫我们的用户升级他们的操作系统和浏览器。

谢谢, 加利赫

【问题讨论】:

    标签: apache internet-explorer ssl virtualhost


    【解决方案1】:

    无论使用哪种浏览器,您都需要修复配置错误。 Alias, No slotmem from mod_heartmonitor, ...

    关于 SSL 错误,您使用的是 SNI (Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366))。 IE 6 不支持 SNI。所以 Apache 不知道 IE 6 用户试图访问哪个站点。

    当 Apache 收到未启用 SNI 的请求时,它会查看端口(此处为 443),并使用在端口 443 上找到的第一个 VirtualHost(在配置中自上而下)处理该请求。因此,IE 6 用户将始终获得在您的配置中出现的第一个 &lt;VirtualHost *:443&gt; 中标识的证书。

    此时你有两个选择。

    1. 不支持 IE 6。在您的网站上注明旧版本不适用于您的网站(坦率地说,IE 6 非常旧,我知道的所有商业网站都不支持它不再)。
    2. 将您希望 IE 6 用户首先看到的默认 &lt;VirtualHost *:443&gt; 放入您的配置中。但他们无法联系到其他人。

    编辑 22:45:如果 IE6 用户也无法访问您网站的 http 版本,则可能是:

    • 它们根本没有连接,请检查您的 Apache 日志。您应该将日志置于调试模式 (LogLevel debug)。
    • 他们已连接,但 Apache 不理解该请求。再次检查 Apache 日志。
    • 他们收到一个页面,但 IE 在尝试呈现显示时崩溃。这可能是由于 IE6 无法理解的 JavaScript 代码造成的。验证浏览器是否接收到页面。我不知道您是否可以在 IE6 中查看某些控制台(我知道最新版本确实有类似的东西)。如果 Javascript 无法执行,您将无法在 IE 中看到该页面。您可以尝试访问一个非常简单的测试页面。

    【讨论】:

    • 嗨 nic,感谢您的回复,如果我将 ssl 的虚拟主机放在第一位,它会使 IE 可以访问我的网络吗?因为就目前而言,IE 无法使用 http 和 https 访问网页。
    • 嗨@Nic3500 IE 6 发出的请求已经登录到apache 的访问日志中,这是否意味着请求已经发出正确?但 apache 或 IE 都无法正确响应请求
    • 我什至无法在 apache 的根文档中测试我的 index.html
    • 好的,但是您的 index.html 是否包含任何 javascript?只用&lt;p&gt;TEST&lt;/p&gt; 放置一个超级简单的测试页面。如果有效,则表示实际页面中的 javascript 与 IE6(或页面中的其他代码)不兼容。
    • 嗨 Nic,我的测试页面只包含文本 -> 正在进行维护
    猜你喜欢
    • 2013-07-21
    • 1970-01-01
    • 1970-01-01
    • 2012-03-30
    • 1970-01-01
    • 2015-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多