WDlinux官方论坛's Archiver

glmgs 发表于 2013-8-19 11:09

发现服务器启用了TRACE Method,怎么解决?

发现服务器启用了TRACE Method,怎么解决?


修复方案:
1)2.0.55以上版本的Apache服务器,可以在httpd.conf的尾部添加:
TraceEnable off
2)如果你使用的是Apache:
-   确认rewrite模块激活(httpd.conf,下面一行前面没有#):
LoadModule rewrite_module modules/mod_rewrite.so
- 在各虚拟主机的配置文件里添加如下语句:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
注:可以在httpd.conf里搜索VirtualHost确定虚拟主机的配置文件。

我修改后的httpd.conf文件

……
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
NameVirtualHost *:80
Include conf/httpd-wdl.conf
Include conf/vhost/*.conf
[color=red][b]TraceEnable off[/b][/color]
[color=black][/color]
[color=#000000][/color]
[color=#000000]红色加粗部分是不是正确的,为什么我这样操作了,检测的还是修复成功呢?[/color]

admin 发表于 2013-8-20 10:17

应该可以的

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.