해당 서버의 정보를 확인 한다.
curl --head http://xxx.xxx.xxx.xxx
HTTP/1.1 200 OK
Date: Fri, 25 Sep 2009 05:54:58 GMT
Server: Apache/2.2.3 (CentOS)
X-Powered-By: PHP/5.1.6
Set-Cookie: PHPSESSID=aaukq8eb9kcfvnrucb4nt96ed3; path=/
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Fri, 25 Sep 2009 05:54:58 GMT
Cache-Control: post-check=0, pre-check=0
Connection: close
Content-Type: text/html; charset=UTF-8
위와 같이 apache 와 php 버전 정보를 확인 할 수 있다.
이 부분은... 쪼금 위험한??? 상태일수도 있으며, 되도록이면 버전 정보를 숨기기 바란다.
방법 ...
# Apache
httpd.conf or apache2.conf 에 해당 옵션을 확인 후 없으면 추가 있으면 수정 한다.
ServerTokens Full
or
ServerTokens OS
부분을
ServerTokens Prod
처럼 수정 한다.
## PHP
php.ini 파일의 해당 옵션을 수정 한다.
expose_php = On
을
expose_php = Off
으로 수정 한다.
그리고 Apache 를 restart 후 curl 로 상태 확인
curl --head http://xxx.xxx.xxx.xxx
HTTP/1.1 200 OK
Date: Fri, 25 Sep 2009 06:05:33 GMT
Server:
Set-Cookie: TSSESSIONblogseabowpekr=44bbe0c968526d117180729b1e9e1e8a; path=/; domain=blog.seabow.pe.kr
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding
Content-Type: text/html; charset=utf-8
처럼 나오면 완료된 것 이다.



