메뉴 건너뛰기

GREATUSER

tech

WEB 아파치(httpd) ServerTokens 설정

위대한유저 2014.03.16 20:13 조회 수 : 8652



1. telnet을 이용한 웹서버 정보 확인 (뭐 굳이 이방법을 사용할건 없고.. 그냥 간편하게 확인하기 위해서.. )

# telnet naver.com 80
Trying 125.209.222.141...
Connected to naver.com.
Escape character is '^]'.
HEAD / HTTP/1.1 (엔터입력)
(엔터입력)
HTTP/1.1 404 Not Found
Server: nginx
Date: Sun, 16 Mar 2014 02:07:00 GMT
Content-Type: text/html; charset=UTF-8
Connection: close

Connection closed by foreign host.



위 붉게 표시된 Server: nginx 라는 부분이 웹서버의 종류가 나타는것... 



2. 아파치의 ServerTokens 옵션으로 해당 항목의 정보공개 수준을 정의 가능

ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
ServerTokens Prod[uctOnly]  => Prod 또는 ProductOnly 라고 기입가능
Server sends (e.g.): Server: Apache
ServerTokens Major
Server sends (e.g.): Server: Apache/2
ServerTokens Minor
Server sends (e.g.): Server: Apache/2.4
ServerTokens Min[imal] => Min 또는 Minimal 이라고 기입가능
Server sends (e.g.): Server: Apache/2.4.2
ServerTokens OS
Server sends (e.g.): Server: Apache/2.4.2 (Unix)


기본값은 전체 정보를 보여주는 "Full" 이며.. 

예제와 같이 Prod 설정이면 가장 적은 정보를 보여주게 됩니다.


웹서버의 정보는 접속자가 굳이 알필요는 없기 때문에 보안적인 측면에서 Prod 정도 설정이면 무난하겠습니다.





번호 제목 글쓴이 날짜 조회 수
» 아파치(httpd) ServerTokens 설정 위대한유저 2014.03.16 8652
위로