DAY3 : 単体でのセキュリティ強化

apache HTTPD 単体で Web サーバのセキュリティ強化を行う方法
設定ファイルは /etc/httpd/conf/httpd.conf です。

不要な情報の排除

  1. ServerTokens
    ServerTokensはHTTPでのアクセスで、サーバー情報を定義します。
    値によって、次のような情報が表示されます。提供する情報が少ない方がセキュリティ強度が高まります。
  2. ServerTokens値表示例
    Full (既定値)Apache/2.2.15 (CentOS) DAV/2
    OSApache/2.2.15 (CentOS)
    MinApache/2.2.15
    MinorApache/2.2
    MajorApache/2
    ProdApache
    無効な値を指定した場合は、Fullが仮定されるので注意が必要です。

  3. ServerSignature
    ServerSignature はCGIにエラーが発生した場合などに、エラーメッセージの最後に表示されます。
    表示される内容は ON で、ServerTokens と同じもの、EMailで AdminEmail と同じものとなり、 OFF で何も表示しません。
  4. Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    Apache/2.2.15 (CentOS) DAV/2 Server at localhost Port 80
    (ServerToekens Full, ServerSignature EMail の例)