5

我试图在我的 .htaccess 文件中指定 SSLCipherSuite,但更改似乎没有生效。我在共享主机帐户上运行,因此只能访问 .htaccess,而不是服务器/虚拟主机配置文件。Apache 文档说这个指令在 .htaccess 上下文中工作。我的服务器正在运行 Apache 2.2。这是我完整的 .htaccess 文件:

RewriteEngine on
ErrorDocument 404 /404.html

# map index.html to root dir
RewriteCond %{HTTP_HOST} ^automsw\.com$ [OR,NC]
RewriteCond %{HTTP_HOST} ^www\.automsw\.com$ [NC]
RewriteRule ^index\.html$ "https\:\/\/www\.automsw\.com\/" [R=301,L]

# map index.html in sub-directories to that directory
RewriteCond %{HTTP_HOST} ^automsw\.com$ [OR,NC]
RewriteCond %{HTTP_HOST} ^www\.automsw\.com$ [NC]
RewriteRule ^(.*)/index\.html$ "https\:\/\/www\.automsw\.com\/$1/" [R=301,L]

# map non-www to www and http to https
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^automsw.com$ [NC]
RewriteRule ^(.*)$ "https\:\/\/www\.automsw\.com\/$1" [R=301,L]

#SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA 3DES RC4 !aNULL !eNULL !LOW !MD5 !EXP !PSK !SRP !DSS +3DES 3DES +RC4 RC4"
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT

我已经尝试了几种不同的 SSLCipherSuite 值,但没有一个会改变服务器测试所确定的结果:

https://www.ssllabs.com/ssltest/analyze.html?d=automsw.com

这是可能的,还是我做错了什么?

提前致谢。

4

1 回答 1

0

有点猜测 - 由于服务器 - 客户端握手发生的方式,这可能无法在 .htacesss 中设置。您无法连接到 Apache 并完成 TLS 握手,然后在 htaccess 文件中协商密码。

请记住,连接首先到达 Apache,并且只有在应用规则之后,.htaccess 才会被解析。

于 2021-02-05T01:31:48.360 回答