In default NGINX configuration, the Server header banner is ON which exposes what version of Nginx you are using. This is considered as information leakage vulnerability. If you are working on auditing or fixing a security issue, then you will be asked to get rid of a version as part of hardening & security.

Implementation

Go to nginx/conf folder Take a backup of a configuration file Add the following in nginx.conf under server section

Restart Nginx webserver

Verification

You can use an online tool Header Checker or developer tools inbuilt in the browser to examine the header.

As you can see, no more version is shown. I hope this helps and if you are looking to learn Nginx then check out this course by Ray Viljoen.

Remove Version from Server Header Banner in nginx - 24Remove Version from Server Header Banner in nginx - 41Remove Version from Server Header Banner in nginx - 45Remove Version from Server Header Banner in nginx - 22Remove Version from Server Header Banner in nginx - 90Remove Version from Server Header Banner in nginx - 21Remove Version from Server Header Banner in nginx - 87Remove Version from Server Header Banner in nginx - 3Remove Version from Server Header Banner in nginx - 76Remove Version from Server Header Banner in nginx - 91Remove Version from Server Header Banner in nginx - 83Remove Version from Server Header Banner in nginx - 51Remove Version from Server Header Banner in nginx - 10Remove Version from Server Header Banner in nginx - 87Remove Version from Server Header Banner in nginx - 3Remove Version from Server Header Banner in nginx - 26Remove Version from Server Header Banner in nginx - 87Remove Version from Server Header Banner in nginx - 86Remove Version from Server Header Banner in nginx - 40Remove Version from Server Header Banner in nginx - 12Remove Version from Server Header Banner in nginx - 91Remove Version from Server Header Banner in nginx - 93Remove Version from Server Header Banner in nginx - 36Remove Version from Server Header Banner in nginx - 6