How remove Nginx version from http response header

Disable the output of product and version by adding the following server_tokens directive to the HTTP context of your /etc/nginx/nginx.conf file:

Go to nginx config folder (cd /etc/nginx/) and open the configuration file (nginx.conf)

Add 


 
    server_tokens off; 


under http section.

Restart Nginx webserver (sudo systemctl restart nginx)

Now verify the response you will see only server name not the version of nginx.



Comments