Disguise Nginx, hide Nginx and PHP versions, and improve server security

Source: Internet
Author: User

Sometimes, when we look at some sites to know what version of the web server is used by others, we find that the version number is not displayed, and even the WEB server has changed, you can use the following methods to hide the version numbers of Nginx and PHP to improve security. (Of course, these are all minor measures, but the focus is on other protection measures !) 1. Step 1: Hide Nginx version: vi/usr/local/nginx/conf/nginx. add server_tokens off to the conf file in http {}. The second feature is vi/usr/local/nginx/conf/fastcgi_params. Change fastcgi_param SERVER_SOFTWARE nginx/$ nginx_version: fastcgi_param SERVER_SOFTWARE nginx; 2. Hide PHP version vi php. ini found: expose_php = On; changed to: expose_php = Off; restarted! 3. Disguise Nginx vi/src/core/nginx. h. Modify it: # define NGINX_VERSION "1.0" # define NGINX_VER "GWS/" NGINX_VERSION to re-compile nginx. The above describes how to disguise Nginx, hide Nginx and PHP versions, and improve server security.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.