Posted on 2009/09/25 15:06
Filed Under OS/YJJ Linux

해당 서버의 정보를 확인 한다.

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


처럼 나오면 완료된 것 이다.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/09/25 15:06 2009/09/25 15:06

트랙백 주소 : http://blog.seabow.pe.kr/trackback/685



About

by 삐꾸강아쥐

Counter

· Total
: 137371
· Today
: 72
· Yesterday
: 0
블로그코리아에 블UP하기