nginx:hide_web_server_version_from_appearing_in_http_header
This is an old revision of the document!
nginx - Hide web server version from appearing in http header
Add this line into /etc/nginx/nginx.conf:
server_tokens off
where this line of config will hide your nginx version number.
Restart or reload nginx for the change to take effect:
/etc/init.t/nginx restart
To check for the header, you can use curl:
curl -I www.foo.net
where -I is for curl to grab just the http header.
returns:
HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Server: Apache/2.2.15 (Red Hat)
nginx/hide_web_server_version_from_appearing_in_http_header.1491227942.txt.gz ยท Last modified: 2020/07/15 09:30 (external edit)