I can hide Nginx version by using server_tokens option set to off. But not able to change the Nginx Server signature.
Steps I did,
1.) Change the Nginx serve
Go to nginx conf and switch off server_tokens.
/etc/nginx/nginx.conf
server_tokens off;
HttpHeadersMoreModule
- http://wiki.nginx.org/HttpHeadersMoreModulemore_set_headers
directive.Reload Nginx to take effect.
server_tokens off;
more_set_headers "Server: MyServerName";
If you are working in ubuntu then
First install nginx-extras
sudo apt-get install nginx-extras
Go to /etc/nginx/nginx.conf
and under http
add:
http {
more_set_headers "Server: Your_New_Server_Name";
server_tokens off;
}
Restart nginx
sudo service nginx restart
You can use this in your Nginx config.
proxy_pass_header Server;
If using ModSecurity v2.0 - v2.9, then in the .conf file you can use
SecServerSignature SomeName
ModSecurity v3 SecServerSignature has been deprecated, but I don't know if they replaced it with something else.