In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how Nginx hides and forges version numbers. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Curl command is used by default to access:
# curl-I http://172.17.0.5
2. Modify the nginx.conf configuration file and add the following code to the http configuration section:
# vim / usr/local/nginx/conf/nginx.confserver_tokens off
3. Modify the fastcgi.conf configuration file and comment on the following code:
# vim / usr/local/nginx/conf/fastcgi.conffastcgi_param SERVER_SOFTWARE nginx/$nginx_version
4. Overload Nginx:
# nginx-s reload
5. Use curl command to access:
# curl-I http://172.17.0.5
6. Forge the name and version number of Nginx:
# vim / usr/src/nginx-1.16.1/src/core/nginx.h Modify the following code # 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 Delete the newly added code: server_tonkens off # nginx-s stop# nginx
7. Use curl command to access:
# curl-I http://172.17.0.5
Thank you for reading! This is the end of the article on "how to hide and forge the version number of Nginx". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.