How to Hide Your NGINX Server Version?

Sometimes hackers target your server with the banner-grabbing technique. 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 effectively protect your server from such scanning tools, making it hard to determine the server's vulnerability.

You can check the Nginx server version by executing the command given below – 

curl --head


Steps to Hide the Nginx Version 

1. Open the Nginx configuration file using this command – 

nano /etc/nginx/nginx.conf

2. Now add the following line as shown below in the config file and save using the ctrl + x command – 

server_tokens off;

Your Nginx version information will be hidden, making your server more secure.


Was this answer helpful?

« Back