隐藏Nginx版本号!

查看隐藏版本号命令:curl -I http://192.168.200.115

[root@localhost ~]# curl -I http://192.168.200.115
HTTP/1.1 200 OK
Server: nginx/1.16.0                                
Date: Thu, 12 Sep 2019 02:46:43 GMT
Content-Type: text/html
Content-Length: 612
Last-Modified: Thu, 12 Sep 2019 01:07:53 GMT
Connection: keep-alive
ETag: "5d799a69-264"
Accept-Ranges: bytes

隐藏版本号方法1:(安装Nginx后)修改配置文件

[root@localhost ~]# killall -9 nginx
[root@localhost ~]# rm -rf /usr/local/nginx/
[root@localhost ~]# cd /usr/src/nginx-1.16.0/
[root@localhost nginx-1.16.0]# make clean
rm -rf Makefile objs
[root@localhost nginx-1.16.0]# cd
[root@localhost ~]# rm -rf /usr/src/nginx-1.16.0/

[root@localhost ~]# tar xf nginx-1.16.0.tar.gz -C /usr/src

 

猜你喜欢

转载自www.cnblogs.com/cxm123123form/p/11511123.html