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.