下载好Nginx的安装文件nginx-1.6.0.tar.gz,并把它解压。
wget http://nginx.org/download/nginx-1.6.0.tar.gz tar xzvf nginx-1.2.3.tar.gz
然后我们修改src/core/nginx.h。
#define NGINX_VERSION "1.2.3" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX"
修改src/http/ngx_http_header_filter_module.c
static char ngx_http_server_string[]="Server: nginx" CRLF;
修改src/http/ngx_http_special_response.c
static u_char ngx_http_error_tail[]="<hr><center>nginx</center>" CRLF "</body>" CRLF "</html>" CRLF ;
最后还有1个地方要修改,Nginx的FastCGI配置文件fastcgi.conf
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
常用Web Server版本名称:
Microsoft-IIS
GWS或GFE
Apache
Lighttpd