http.confのServerTokensに値を設定し、ServerSignatureの値を変更することによりどのような変化になるか試してみました。
使用したOSは、CentOS5で、Apacheのバージョンは以下の通りです。
$ /usr/sbin/httpd -v Server version: Apache/2.2.3 Server built: Feb 22 2012 10:54:25
以下のように設定しブラウザで404 Not FoundになるURLにアクセスしてみました。
ServerTokens Full ServerSignature On
ServerTokensがFullの時のサーバ情報が表示されました。
ServerTokens Full ServerSignature Off
ServerTokensがFullですが、サーバ情報は何も表示されなくなりました。
しかし、telnetコマンドでApacheに接続してHTTPヘッダを確認したところ、以下のようにServer:が存在していました。
$ telnet localhost 80 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. GET /foo HTTP/1.1 HTTP/1.1 400 Bad Request Date: Fri, 13 Apr 2012 12:53:10 GMT Server: Apache/2.2.3 (CentOS) DAV/2 Content-Length: 226 Connection: close Content-Type: text/html; charset=iso-8859-1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> </body></html> Connection closed by foreign host.
ServerTokens Full ServerSignature Email
ServerTokensがFullのサーバ情報が表示され、リンクが作成されています。(青のアンダーライン部分)
これは、ServerAdminで指定したメールアドレスでmail to:が作成されています。
以下、telnetコマンドでhttpに接続した時の出力です。
mail to:が追加されているのがわかります。
$ telnet localhost 80 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. GET /foo HTTP/1.0 HTTP/1.1 404 Not Found Date: Fri, 13 Apr 2012 12:51:17 GMT Server: Apache/2.2.3 (CentOS) DAV/2 Content-Length: 317 Connection: close Content-Type: text/html; charset=iso-8859-1 <!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> <address>Apache/2.2.3 (CentOS) DAV/2 Server at <a href="mailto:root@localhost">127.0.0.1</a> Port 80</address> </body></html> Connection closed by foreign host.