概要 †
HTTPレスポンスヘッダに含まれるPHPのバージョン情報を削除してみます。
手順 †
- <php.ini>を開きます。
1
2
3
4
5
6
7
8
9
10
11
| -
|
|
!
-
|
|
|
|
|
!
|
expose_php = Off
|
- Apacheを再起動します。
1
|
| /etc/init.d/httpd restart
|
- HTTPレスポンスヘッダを確認します。
今回はlynxで確認しました。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
| lynx -head -dump <URL>
HTTP/1.1 200 OK
Date: Wed, 08 Dec 2010 15:14:47 GMT
Server: Apache
Accept-Ranges: bytes
Cache-control: no-cache
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
X-Pad: avoid browser bug
Vary: Accept-Encoding
Connection: close
[X-Powered-By:]欄がなければ成功です。
|
検証時の環境 †