8 messages in ru.sysoev.nginxRe: Question: how to hide header "Ser...
FromSent OnAttachments
Toshiki NISHIHATAOct 28, 2006 10:13 am 
Igor SysoevOct 28, 2006 10:24 am 
Toshiki NISHIHATAOct 28, 2006 4:20 pm 
Bob IppolitoOct 28, 2006 4:33 pm 
Toshiki NISHIHATAOct 28, 2006 5:00 pm 
Igor SysoevOct 30, 2006 1:45 am.txt
GentooNov 2, 2006 5:38 pm 
Igor SysoevNov 3, 2006 12:08 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Question: how to hide header "Server"Actions...
From:Bob Ippolito (bob-@public.gmane.org)
Date:Oct 28, 2006 4:33:45 pm
List:ru.sysoev.nginx

On 10/28/06, Toshiki NISHIHATA <nsht@public.gmane.org>
wrote:

2006/10/29, Igor Sysoev <is-G@public.gmane.org>:

On Sun, 29 Oct 2006, Toshiki NISHIHATA wrote:

I use nginx of GNU/Linux Ecth(testing) package.

# nginx -v nginx version: nginx/0.4.2 built by gcc 4.1.2 20060901 (prerelease) (Debian 4.1.1-13)

For security, I want to hide the http header; "Server: nginx/0.4.2 ". I thouth that "proxy_pass_header Server" allows transferring "Server" header forbidden. So, I rewrite follow at /etc/nginx/nginx.conf, but header "Server" didn't hide.

location / { root /var/www; proxy_pass_header Server; }

$ telnet sample.com 80 GET /index.html HTTP/1.0

HTTP/1.1 200 OK Server: nginx/0.4.2 <-------------- want to hide!! Date: Sat, 28 Oct 2006 16:58:28 GMT Content-Type: text/html Content-Length: 151 ....

What should I do?

"proxy_pass_header Server" passes a backend Server header only. To disable Server header for static responses you need to patch the sources: currently there is no directive to disable it.

Thank you to respond a baby question.

As a future plan of development, Don't you have a plan to add such a directive?

I think that's what the wiki feature requests page is for: http://wiki.codemongers.com/NginxFeatureRequests

-bob