Upgrade to view the modules that have been installed
[Root@mail ~]#/opt/nginx/sbin/nginx-vnginx version:nginx/0.5.34built by gcc 3.4.6 20060404 (Red Hat 3.4.6-3) Configure a Rguments:--prefix=/opt/nginx--sbin-path=/opt/nginx/sbin/nginx--conf-path=/opt/nginx/conf/nginx.conf--pid-path= /var/run/nginx/nginx.pid--error-log-path=/var/log/nginx/error.log--http-log-path=/var/log/nginx/access.log-- Http-proxy-temp-path=/opt/nginx/temp/proxy--http-fastcgi-temp-path=/opt/nginx/temp/fcgi--lock-path=/var/run/ Nginx/nginx.lock--with-http_ssl_module--with-http_sub_module--with-http_stub_status_module--with-debug
To modify the version number:
[Root@mail nginx-0.8.39]# VI src/core/nginx.h#define nginx_version 8039#define nginx_version "0.8.39" # Define Nginx_ver "nginx/" nginx_version changed to: #define Nginx_version 8039#define nginx_version "0.0.0" # Define Nginx_ver "netbig/" nginx_version
And then recompile:
# # Add Http_gzip and http_flv modules./configure--prefix=/opt/nginx \--sbin-path=/opt/nginx/sbin/nginx \--conf-path=/opt/ nginx/conf/nginx.conf \--pid-path=/var/run/nginx/nginx.pid \--error-log-path=/var/log/nginx/error.log \-- Http-log-path=/var/log/nginx/access.log \--http-proxy-temp-path=/opt/nginx/temp/proxy \--http-fastcgi-temp-path= /opt/nginx/temp/fcgi \--lock-path=/var/run/nginx/nginx.lock \--with-http_ssl_module \--with-http_sub_module \-- With-http_gzip_static_module \--with-http_stub_status_module \--with-http_flv_module \--with-debug Makemake Install
Re-start Nginx
[Root@mail nginx-0.8.39]# nginxctl stopshutting down nginx: [root@mail vhosts]# nginxctl startstarting nginx: Success nginx## Note: This nginxctl is written by himself script [Root@mail vhosts]#/opt/nginx/sbin/nginx-vnginx version:netbig/0.0.0built by GCC 3.4.6 20060404 (Red Hat 3.4.6-3) TLS SNI support disabledconfigure arguments:--prefix=/opt/nginx--sbin-path=/opt/nginx/ Sbin/nginx--conf-path=/opt/nginx/conf/nginx.conf--pid-path=/var/run/nginx/nginx.pid--error-log-path=/var/log/ Nginx/error.log--http-log-path=/var/log/nginx/access.log--http-proxy-temp-path=/opt/nginx/temp/proxy-- http-fastcgi-temp-path=/opt/nginx/temp/fcgi--lock-path=/var/run/nginx/nginx.lock--with-http_ssl_module-- With-http_sub_module--with-http_gzip_static_module--with-http_stub_status_module--with-http_flv_module-- With-debug
View response Header
[Root@mail vhosts]# curl-i http://www.tech.zhangben.comHTTP/1.1 okserver:netbig/0.0.0date:tue, June 2010 07:09:11 gmtcontent-type:text/html; Charset=utf-8connection:keep-alivevary:cookie