Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

For example -

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.

share|improve this question
what have you tried so far. you should include your research into your question – Drew Khoury Sep 7 '13 at 4:04
up vote 1 down vote accepted

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"
share|improve this answer
thanks for the reply. which file i've to edit? can you put here commands? I'm totally Newbie for NGINX :( – Kimi Sep 6 '13 at 15:48


B. Edit source code and replace ngx_http_server_string value

C. [Beta] Use modsecurity

D. [not recommended] Use reverse-proxy like Varnish or Squid to hide header (headers will be resolvable when accessing localhost)

share|improve this answer
thanks for the reply. which file I've to edit? – Kimi Sep 6 '13 at 15:45
note, it's still possible to recognize, that it's not IIS – GioMac Sep 6 '13 at 15:49
thanks for the help. so what is best way to hide/change Server name? except Cloudflare. – Kimi Sep 6 '13 at 15:52
depends on what do you use for dynamic pages. hard to tell. – GioMac Sep 6 '13 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.