How to Hide Your NGINX Server Version. Print

  • 0

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.

  1. You can check the nginx server version by executing the below command.

    curl --head	

  2. To hide the nginx version, Open the nginx configuration file using the below command.

    nano /etc/nginx/nginx.conf	
  3. Now add the following line as shown in the below image in the config file and save using ctr+x button.

    server_tokens off;	

      That’s it now the nginx version information will be hidden and thus it will make your server more secure.

Was this answer helpful?

« Back
Sign up for a newsletter