Apache: Disable the HTTP TRACE Method
編輯 apache 的系統檔(Apache 1.3.34、2.0.55 以後版本)
$ vi /etc/httpd/conf/httpd.conf
最下方找空白的地方加入
TraceEnable off
重啟 apache 服務
$ service httpd restart
測試是否正常關閉
$ curl -i -X TRACE http://www._website_.com/
HTTP/1.1 405 Method Not Allowed
Date: Wed, 13 Feb 2013 14:30:32 GMT
Server: Apache/2.2.15 (CentOS)
Allow:
Content-Length: 223
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method TRACE is not allowed for the URL /.</p>
</body></html>
留言
張貼留言