nginx how to hide the version information

One of the most basic optimization of protection

1, after our daily custom install nginx, by accessing the page does not exist in the back of the 404 pages you can see the version information and nginx server.

Pictures .png

2, that is actually the version information can be hidden, the following specific about:

        First, the unzipped file directory as follows: /root/nginx-1.14.2/src/core - There is a file called nginx.h

                                                                                           It is clear you can see the version of the server types and specific information

Pictures .png

        Second, hide file version information by modifying this (revised)

Pictures .png

        Third, the effect is as follows:Pictures .png

3, to this end.


Guess you like

Origin blog.51cto.com/14174084/2463336