[root@CXW nginx-1.10.2]# vim src/http/ngx_http_header_filter_module.c
修改前:
static char ngx_http_server_string[] = "Server: nginx" CRLF;//第49行
修改后:
static char ngx_http_server_string[] = "Server:CXW" CRLF;
[root@CXW nginx-1.10.2]# vim src/http/ngx_http_special_response.c
修改前
static u_char ngx_http_error_tail[] =//第29行
"<hr><center>nginx</center>" CRLF
"</body>" CRLF
"</html>" CRLF
;
修改后 static u_char ngx_http_error_tail[] = "<hr><center>CXW</center>" CRLF "</body>" CRLF "</html>" CRLF ;

2、安装ngnix
[root@CXW nginx-1.10.2]# groupadd www #添加www组 [root@CXW nginx-1.10.2]# useradd -g www www -s /sbin/nologin #创建nginx运行账户www并加入到www组,不允许www用户直接登录系统
root@CXW nginx-1.10.2]#./configure --prefix=/nginx1.10 --with-http_dav_module --with-http_stub_status_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-pcre --with-http_ssl_module --with-http_gzip_static_module --user=www --group=www [root@CXW nginx-1.10.2]# make && make install
相关选项说明
--with-http_dav_module #增加PUT,DELETE,MKCOL:创建集合,COPY和MOVE方法
--with-http_stub_status_module #获取Nginx的状态统计信息
--with-http_addition_module #作为一个输出过滤器,支持不完全缓冲,分部分相应请求
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-76432-2.html
大喊被美国人欺负了