Sometimes hackers target your server with a technic called banner grabbing. Usually, banner grabbing is used for vulnerability assessment of the server by scanning your server for running services, open ports, and other information on the server. Hiding your server version will surely protect your server from such scanning tools and it will be hard to determine the vulnerability of the server without knowing the webserver version.
- You can check the nginx server version by executing the below command.
curl --head domain.com
- To hide the nginx version, Open the nginx configuration file using the below command.
- Now add the following line as shown in the below image in the config file and save using ctr+x button.
That’s it now the nginx version information will be hidden and thus it will make your server more secure.