Apacheメモ。
ヘッダや404ページでソフトのバージョンとかを出さない
ServerTokens Prod # Headerから情報を消す
ServerSignature Off # Errorページ等から情報を消す
※Apache2xではServerTokensだけで両方消える。
fakemac:~% HEAD http://localhost/foo
404 Not Found
Connection: close
Date: Mon, 23 Jan 2006 09:45:43 GMT
<strong>Server: Apache/2.0.55 (Debian) PHP/4.4.0-4</strong>
Content-Type: text/html; charset=iso-8859-1
Client-Date: Mon, 23 Jan 2006 09:45:43 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
fakemac:~% GET http://localhost/foo
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /foo was not found on this server.</p>
<hr>
<strong><address>Apache/2.0.55 (Debian) PHP/4.4.0-4 Server at localhost Port 80</address></strong>
</body></html>
これが、
fakemac:~% HEAD http://localhost/foo
404 Not Found
Connection: close
Date: Mon, 23 Jan 2006 09:46:01 GMT
<strong>Server: Apache</strong>
Content-Type: text/html; charset=iso-8859-1
Client-Date: Mon, 23 Jan 2006 09:46:01 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1
fakemac:~% GET http://localhost/foo
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /foo was not found on this server.</p>
<hr>
<strong><address>Apache Server at localhost Port 80</address></strong>
</body></html>
こうなる。(さっそくGETを使い始めた野郎)