웹 서버를 위장하기 위해 Nginx 버전 이름을 수정하는 방법
nginx의 기본 이름을 수정하는 방법은 조금 위장하거나 x를 설치할 수 있습니다
일반적으로 3개의 위치를 수정해야 합니다. 하나는 nginx.h이고 다른 하나는 ngx_http_header_filter_module.c이고 다른 하나는 ngx_http_special_response.c입니다.
팁: 일반적으로 nginx가 컴파일되기 전에 수정이 이루어집니다. 수정 후에는 다시 컴파일해야 합니다
코드는 다음과 같습니다:
scr/core/nginx.conf
#define nginx_version "1.4.7"
#define nginx_ver " nginx/" nginx_version
은 다음과 같이 수정됩니다. (실제로 버전 번호도 마음대로 수정할 수 있습니다.)
코드는 다음과 같습니다.
#define nginx_version "1.4.7"
# nginx_ver "jdws/" nginx_version을 정의하세요
사실 위 내용을 수정하면 큰 부분이 적용됩니다! ! !
코드는 다음과 같습니다.
/src/http/ngx_http_header_filter_module.c (http responseheader)
static char ngx_http_server_string[] = "server: nginx" crlf;
수정:
static char ngx_http_server_string[] = serv " er: jdws" crlf;
/src/http/ngx_http_special_response.c
static u_char ngx_http_error_tail[] =
"
"