HOME 生活记录运维/编程
作者/来源:yixinu.com
栏目:运维/编程
日期:2013-06-02 01:54:05

1、将nginx源码包解压 ,进入目录

[root@localhost http]# cd ./nginx-1.4.1/src/http
[root@localhost http]# vim ./ngx_http_special_response.c
  
 21 static u_char ngx_http_error_full_tail[] =
 22 "<hr><center>www.xl.com</center>" CRLF
 23 "</body>" CRLF
 24 "</html>" CRLF
 25 ;
 26
 27
 28 static u_char ngx_http_error_tail[] =
 29 "<hr><center>www.xl.com</center>" CRLF
 30 "</body>" CRLF
 31 "</html>" CRLF

上面代码中的两个函数,是显示nginx版本信息的,修改为自己的内容即可

说明 :整个这个文件都是显示nginx报错的页面信息,自己想怎么改就怎么改。



nginx 去掉debug编译

缺省配置和编译是带-g选项的,这样会使可执行文件变大,去掉-g就很小了。

编辑文件: nginx/auto/cc/gcc

找到debug项,注释掉。

分享到:

Copyright © 2013-2014 yixinu.com 湘ICP备14004402号

QQ:316686606  Email: 316686606@qq.com