If you are using an old version of Nginx or if you want to explicitly hide the Nginx version in your HTTP headers and your default error pages, you can use the
server_tokens directive in your Nginx configuration. The server_tokens directive can be used either in the http, server or location block.
off (it is set to
on by default) to hide your Nginx version in all externally visible places.
Just like using Apache’s ServerSignature and ServerTokens directive, your Nginx version should now be hidden in the server signature and the default error pages. To check the server headers, use the HTTP Header Checker utility from Webconfs.com.