1、下载nginx的源码
wget http://nginx.org/download/nginx-1.15.12.tar.gz
2、修改nginx的banner
#ifndef _NGINX_H_INCLUDED_
#define _NGINX_H_INCLUDED_
#define nginx_version 33333005010
#define NGINX_VERSION "888888888"
#define NGINX_VER "haha/" NGINX_VERSION
#define NGINX_VAR "AHAH"
#define NGX_OLDPID_EXT ".oldbin"
#endif /* _NGINX_H_INCLUDED_ */
3、安装
./configure --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock
make && make install
网友评论