Nginx – How to change NGINX server name

apache-2.2mod-rewritenginxUbuntu

In the Apache web server we can change the server signature (Apache Name) using mod_rewrite.

For example – http://www.howtoforge.com/changing-apache-server-name-to-whatever-you-want-with-mod_security-on-debian-6

How would I do the same with Nginx? I am new to Nginx and want to replace the Nginx name with my own signature.

I am using Ubuntu 12.04 Server Edition.

Best Answer

For nginx, you will need to compile in the headers more module (it is not included with nginx by default). This will allow you to override the Server: header.

After that, you can simply do:

more_set_headers "Server: my_phone/1.0"