메뉴 건너뛰기

GREATUSER

tech

WEB 아파치(httpd) ServerTokens 설정

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



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 정도 설정이면 무난하겠습니다.





번호 제목 글쓴이 날짜 조회 수
34 How to download and install prebuilt OpenJDK packages in LINUX(redhat and ubuntu) 관리자 2018.04.24 1226
33 XE 1.8.3 Release 위대한유저 2015.06.11 1324
32 yum update error: "error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"" 위대한유저 2015.01.30 1542
31 mysql server system variables log_warnings to log_error_verbosity 관리자 2016.10.05 1680
30 XE 1.8.2까지의 버전에서 슬라이드 사용안함 속성이 반영 안되는 문제 위대한유저 2015.05.21 1754
29 error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE in PHP (after update centos-7.4) 관리자 2017.11.15 1838
28 mysql error : No data – zero rows fetched, selected, or processed 관리자 2016.04.06 2058
27 IE 확대/축소 기능끄기 위대한유저 2014.07.01 2477
26 윈도우에서 ARP CACHE 삭제/초기화 하는 방법 위대한유저 2015.05.29 2694
25 xfce4 on centos7(rhel7) 위대한유저 2015.01.28 2871
24 넷북 환경에서 윈도우 8.1 업데이트 하기 위대한유저 2014.05.14 3534
23 net use 사용시 시스템 오류 58(이)가 생겼습니다. 위대한유저 2015.04.08 6082
22 [python] 현재 실행중인 함수 이름 구하기 (sys._getframe().f_code.co_name) 관리자 2018.03.28 7304
» 아파치(httpd) ServerTokens 설정 위대한유저 2014.03.16 8657
20 Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP 위대한유저 2014.01.01 14133
위로