How to hide Nginx version on Linux and Unix

To hide the Nginx version on Linux and Unix systems, you can edit the Nginx configuration file (usually located at /etc/nginx/nginx.conf) and add the following line in the main context:

server_tokens off;

This will prevent Nginx from including the version number in the Server HTTP response header.

You can also add the line

server_tokens off;
}```
in the http block of the nginx.conf
After making the change, you will need to reload or restart Nginx for the changes to take effect.

Leave a Comment