Apache의 Web Server의 Version 숨기는 것은 httpd.conf 에서 ServerTokens 지시자를 통해서 쉽게 설정할 수 있다. 하지만 이렇게 설정을 하더라도 Web Server Header에 'X-Powered-By: PHP/4.x.x'와 같이 PHP Version을 그대로 볼 수 있다.
$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
HEAD / HTTP/1.0
HTTP/1.1 200 OK
Date: Sun, 11 Apr 2004 15:17:10 GMT
Server: Apache
X-Powered-By: PHP/4.x.x (버전이 표시되는데 글 작성할 때 4.x.x로 수정했음)
Connection: close
Content-Type: text/html
Connection closed by foreign host.
그러면 어떻게 숨길까?
php.ini File에서 다음과 같이 바꾸고 Web Server를 재실행 한다.
expose_php = On
expose_php = Off
'Programming > PHP' 카테고리의 다른 글
| Web Server Header에서 PHP Version 정보 숨기기 (0) | 2007/09/24 |
|---|---|
| PHP 설정파일 (0) | 2007/09/23 |
| GnuBoard 게시판 스킨에서 여분필드 사용하기 (0) | 2007/07/01 |