修改src/http/ngx_http_header_filter_module.c
找到下面两行:
static char ngx_http_server_string[] = "Server: nginx" CRLF;
static char ngx_http_server_full_string[] = "Server: " NGINX_VER CRLF;
将其修改为:
static char ngx_http_server_string[] = "Server: nginx" CRLF;
static char ngx_http_server_full_string[] = "Server: SWS" CRLF;
完成,保存,编译、启动
原始
未经允许请勿转载:程序喵 » Nginx修改http响应头 伪装你的WEB服务器