Apache2 config @Ubuntu7.0.4

Apache2で

"Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server at xx.xx.xx.xx Port 80"

のようにエラーページのフッタに表示しないようにするためのメモ
# HTTPリプライヘッダも同様

以下,aptでapache2をインストールしたときの設定

/etc/apache2/apache2.confの編集

ServerTokens Prod[uctOnly]
ServerSignature Off

/etc/apache2/sites-availables/defaultの編集

<Direcotry /var/www>
....
ServerSignature Off
</Directory>

当然ながら,編集後に再起動.

/etc/apache2/apache2.confをいじっただけでは

"Apache Server at xx.xx.xx.xx Port 80"

のようにIPとポート番号が晒されてしまうのが注意点.

参考:
http://ubuntuforums.org/archive/index.php/t-43398.html