このブログを検索

2011年2月24日木曜日

[PHP]バージョンを見えないようにする

PHPの場合、Apacheのバージョンを見えなくするをした上で、さらにPHPの設定を変更します。

php.iniを次のように変更します。
expose_php = Off

●変更前
$ telnet sssdev1 80
Trying 192.xxx.xxx.xxx...
Connected to sssdev1.sss.indexweb.co.jp (192.xxx.xxx.xxx).
Escape character is '^]'.
GET /pinfo.php HTTP/1.1
Host: ssssfuka.indexweb.co.jp

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 03:09:46 GMT
Server: Apache
ココ→★X-Powered-By: PHP/5.2.17
Transfer-Encoding: chunked
Content-Type: text/html
        :
●設定後
$ telnet sssdev1 80
Trying 192.xxx.xxx.xxx...
Connected to sssdev1.sss.indexweb.co.jp (192.xxx.xxx.xxx).
Escape character is '^]'.
GET /pinfo.php HTTP/1.1
Host: ssssfuka.indexweb.co.jp

HTTP/1.1 200 OK
Date: Thu, 24 Feb 2011 03:11:17 GMT
Server: Apache
★(表示されない)
Transfer-Encoding: chunked
Content-Type: text/html
        :

0 件のコメント:

コメントを投稿