Apache/2.2.22 (Debian7.4)

/etc/apache2/conf.dsecurity というファイルの ServerTokens 部分

# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of: Full | OS | Minimal | Minor | Major | Prod
# where Full conveys the most information, and Prod the least.
#
#ServerTokens Minimal
ServerTokens OS
#ServerTokens Full

先頭にある「#」を外す(デフォルトではOSになっている)。

・ServerTokens Minimal:Apache/2.2.22 Server at 192.168.0.10 Port 80
・ServerTokens OS:Apache/2.2.22 (Debian) Server at 192.168.0.10 Port 80
・ServerTokens Full:Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u7 mod_ssl/2.2.22 OpenSSL/1.0.1e Server at 192.168.0.10 Port 80

他にも、

・ServerTokens Prod:Apache Server at 192.168.0.10 Port 80
・ServerTokens Major:Apache/2 Server at 192.168.0.10 Port 80
・ServerTokens Minor:Apache/2.2 Server at 192.168.0.10 Port 80

がある。

設定の後、Apacheを再起動。

service apache2 restart

当然だが、rootでないと操作できないので注意。

サーバ構築の実際がわかる Apache[実践]運用/管理 (Software Design plus)
鶴長 鎮一
技術評論社
売り上げランキング: 22,001

[PR] au PAY / au WALLET カード 情報