对nginx的一个版本进行隐藏,这样你不知道登入的网站到底用的是什么服务器
JFWS/3.0 虚构web服务 虚构版本号
/usr/src/nginx-1.16.1/src --来到src下面,有大量的源码文件
[root@localhost src]# ls
core event http mail misc os stream
[root@localhost core]# cd core
[root@localhost core]# vi nginx.h
这里面定义了版本的信息
#define NGINX_VERSION "3.0"
#define NGINX_VER "JFWS/" NGINX_VERSION
[root@localhost nginx-1.16.1]# ./configure --prefix=/usr/local/nginx --预编译
[root@localhost nginx-1.16.1]# make build && make install --编译并且安装
[root@localhost nginx-1.16.1]# /usr/local/nginx/sbin/nginx --启动nginx,再去访问就ok了