Z's space


Prevent ngix sending server info in HTTP header

Filed under: Computing — by zhuqy @ 17:09

There is no directive currently in ngix server to disable “server” header being sent.  The closest one is “server_tokens off” which only turns off version string, it still sends out “Server: nginx” information in the reply.

In src/http/ngx_http_header_filter_module.c, comment out all code related to ngx_http_server_string, ngx_http_server_full_string and r->headers_out.server then recompile the server and you have it.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: