In order to improve the security of our web server, we should as much as possible information hiding server to prevent someone from breaking our server to find loopholes through which information, for Nginx concerned, we installed Nginx Nginx version number of the best hidden to by preventing the release of exploits our server.
Without hidden, we can see the version number by Nginx http response header, as shown below
We can join in the http section of nginx.conf server_tokens off
to hide our version number
After modifying Remember reload the configuration file ( nginx -s reload
) for the changes to take effect, take effect again requested to see our server response header, this time Nginx software version number that has been hidden, improve a little security.