このエントリーをはてなブックマークに追加


ServerTokensとServerSignatureを試す

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

スポンサーリンク

関連資料

ServerTokensにFullを設定しServerSignature On

以下のように設定しブラウザで404 Not FoundになるURLにアクセスしてみました。

ServerTokens Full
ServerSignature On
sig-on.gif
 

ServerTokensがFullの時のサーバ情報が表示されました。

ServerTokensにFullを設定しServerSignature Off

ServerTokens Full
ServerSignature Off
sig-off.gif
 

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
ServerSignature Email
sig-email.gif
 

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.

参考記事


スポンサーリンク

添付ファイル: filesig-email.gif 587件 [詳細] filesig-off.gif 545件 [詳細] filesig-on.gif 562件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-03-20 (金) 22:35:45