리눅스

아파치 버전 정보 노출 막기

변군이글루 2013. 6. 18. 21:43
반응형

아파치 버전 정보 노출 막기

ServerTokens 설정

ServerTokens 지시어를 Prod로 설정하여 서버 응답 헤더에서 최소한의 정보만 노출하도록 합니다.

vim /etc/httpd/conf/httpd.conf
#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of: Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Prod

ServerSignature 설정

ServerSignature를 Off로 설정하여 서버 생성 페이지(예: 오류 페이지, 디렉터리 리스팅)에서 버전 정보와 호스트 이름을 표시하지 않도록 합니다.

vim /etc/httpd/conf/httpd.conf
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature Off

설정 적용

sudo systemctl restart httpd

설정 확인

curl -I http://<서버주소>

 

728x90
반응형