nginx modify the default server name

Mainly involves 3 files, nginx.h, ngx_http_header_filter_module.c and ngx_http_special_response.c

 

scr/core/nginx.conf

#define NGINX_VERSION "1.12.2"

#define NGINX_VER "nginx/" NGINX_VERSION

changed to

#define NGINX_VERSION "1.12.2"

#define NGINX_VER "quexing/" NGINX_VERSION

 

src/http/ngx_http_header_filter_module.c

static char ngx_http_server_string[] = "Server: nginx" CRLF;

changed to

static char ngx_http_server_string[] = "Server: quexing" CRLF;

 

src/http/ngx_http_special_response.c

static u_char ngx_http_error_tail[] =

"<hr><center>nginx</center>" CRLF

"</body>" CRLF

"</html>" CRLF

changed to

static u_char ngx_http_error_tail[] =

"<hr><center>quexing</center>" CRLF

"</body>" CRLF

"</html>" CRLF 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326306325&siteId=291194637