このブログを検索

2011年2月24日木曜日

[Apache]バージョンを見えないようにする

Apacheのバージョンが見えるとセキュリティ上、問題があります。
例えば、そのバージョンにあるセキュリティホールを使われてしまうリスクがあるためです。
詳細はこちら。
http://httpd.apache.org/docs/2.2/ja/mod/core.html#servertokens

httpd.confに次のように記述します。
ServerTokens ProductOnly
●変更前
$ telnet sssdev1 80
Trying 172.xxx.xxx.xxx...
Connected to sssdev1.sss.indexweb.co.jp (172.xxx.xxx.xxx).
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Thu, 24 Feb 2011 01:08:00 GMT
ココ→★Server: Apache/2.2.1x (Unix) DAV/2 PHP/5.2.1x
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1
       :
●設定後
$ telnet sssdev1 80
Trying 172.xxx.xxx.xxx...
Connected to sssdev1.sss.indexweb.co.jp (172.xxx.xxx.xxx).
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Thu, 24 Feb 2011 01:08:57 GMT
ココ→★Server: Apache
Content-Length: 226
Connection: close
Content-Type: text/html; charset=iso-8859-1
       :

0 件のコメント:

コメントを投稿