Super User is a question and answer site for computer enthusiasts and power users. 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 nginx 1.2 & 1.3 you can modify the source to change the name:

src/http/ngx_http_header_filter_module.c (lines 48 and 49):

static char ngx_http_server_string[] = "Server: Not Nginx" CRLF;
static char ngx_http_server_full_string[] = "Server: Not Nginx/1.0" CRLF;

Renaming those and recompiling the source changes the server response name in nginx 1.2.

However doing this in 1.3 does not seem to change the name. It still says nginx/1.3.5 and with server_tokens off; it just says nginx.

How can I change the server name in 1.3 without installing the 3rd party addon headers more? I want to compile from source.

share|improve this question

Change: src/http/modules/perl/Makefile.PL

Where it reads:

NAME              => 'nginx',
share|improve this answer

I've tried with Nginx 1.3.7. You can still use the same technique as before.

Change: src/http/ngx_http_header_filter_module.c

Where it reads:

static char ngx_http_server_string[] = "Server: nginx" CRLF;

and then change: src/core/nginx.h

Where it reads:

#define NGINX_VERSION      "1.3.7"
#define NGINX_VER          "nginx/" NGINX_VERSION
share|improve this answer

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.