圆月山庄资源网 Design By www.vgjia.com

1、默认使用curl命令访问:

# curl -I http://172.17.0.5

Nginx隐藏和伪造版本号的操作方法

2、修改nginx.conf配置文件,在http配置段中新增如下代码:

# vim /usr/local/nginx/conf/nginx.conf
server_tokens off;

Nginx隐藏和伪造版本号的操作方法

3、修改fastcgi.conf配置文件,注释如下代码:

# vim /usr/local/nginx/conf/fastcgi.conf
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

4、重载Nginx:

# nginx -s reload

5、使用curl命令访问:

# curl -I http://172.17.0.5

Nginx隐藏和伪造版本号的操作方法

6、伪造Nginx的名称和版本号:

# vim /usr/src/nginx-1.16.1/src/core/nginx.h,修改如下代码
#define NGINX_VERSION "1.16.1" --> #define NGINX_VERSION "2.3.2"
#define NGINX_VER "nginx/" NGINX_VERSION --> #define NGINX_VER "Tengine/" NGINX_VERSION
# cd /usr/src/nginx-1.16.1
# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-threads --with-file-aio --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module --with-stream_ssl_preread_module --with-compat --with-pcre
# make && make install
# cd /usr/local/nginx/conf
# vim nginx.conf,删除之前新增的代码:server_tonkens off;
# nginx -s stop
# nginx

7、使用curl命令访问:

# curl -I http://172.17.0.5

Nginx隐藏和伪造版本号的操作方法

总结

以上所述是小编给大家介绍的Nginx隐藏和伪造版本号的操作方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!
如果你觉得本文对你有帮助,欢迎转载,烦请注明出处,谢谢!

标签:
nginx,隐藏版本号,nginx伪造版本号

圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com

P70系列延期,华为新旗舰将在下月发布

3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。

而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?

根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。