<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GzV8.com &#187; head</title>
	<atom:link href="http://www.gzv8.com/archives/tag/head/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gzv8.com</link>
	<description>互联网引擎</description>
	<lastBuildDate>Thu, 06 Jan 2011 04:08:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>让 Nginx 关闭版本显示信息</title>
		<link>http://www.gzv8.com/archives/191</link>
		<comments>http://www.gzv8.com/archives/191#comments</comments>
		<pubDate>Thu, 11 Mar 2010 07:15:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[head]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[版本]]></category>
		<category><![CDATA[隐藏]]></category>

		<guid isPermaLink="false">http://www.gzv8.com/?p=191</guid>
		<description><![CDATA[Nginx 会在 http 头，或者出现错误页的时候会有醒目的版本号提示。
为了安全，可以关闭这些信息。
方法很简单，只需在 nginx.conf 的 http {  里头加入 server_tokens 的参数
例如：
http {
    include       mime.types;
    default_type  application/octet-stream;
    server_tokens off;     #关闭版本显示
    client_header_timeout       3m;
    client_body_timeout         3m;
    send_timeout                3m;
使用 curl 工具测试结果如下：
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Fri, 11 Dec 2009 01:47:53 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Keep-Alive: timeout=20
Location: http://www.gznow.cn/index
如果想把 Server 所显示的名称也修改，可以参阅：http://www.oschina.net/bbs/thread/1568?lp=1
]]></description>
			<content:encoded><![CDATA[<p>Nginx 会在 http 头，或者出现错误页的时候会有醒目的版本号提示。</p>
<p>为了安全，可以关闭这些信息。</p>
<p>方法很简单，只需在 nginx.conf 的 http {  里头加入 server_tokens 的参数<br />
例如：</p>
<p>http {<br />
    include       mime.types;<br />
    default_type  application/octet-stream;<br />
    <strong>server_tokens off;     #关闭版本显示</strong><br />
    client_header_timeout       3m;<br />
    client_body_timeout         3m;<br />
    send_timeout                3m;</p>
<p>使用 curl 工具测试结果如下：</p>
<p>HTTP/1.1 301 Moved Permanently<br />
Server: nginx<br />
Date: Fri, 11 Dec 2009 01:47:53 GMT<br />
Content-Type: text/html<br />
Content-Length: 178<br />
Connection: keep-alive<br />
Keep-Alive: timeout=20<br />
Location: <a href="http://www.gznow.cn/index">http://www.gznow.cn/index</a></p>
<p>如果想把 Server 所显示的名称也修改，可以参阅：<a href="http://www.oschina.net/bbs/thread/1568?lp=1">http://www.oschina.net/bbs/thread/1568?lp=1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gzv8.com/archives/191/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>有趣DIY..把 Nginx 的 head 修改成你自己的</title>
		<link>http://www.gzv8.com/archives/125</link>
		<comments>http://www.gzv8.com/archives/125#comments</comments>
		<pubDate>Thu, 11 Mar 2010 04:46:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[head]]></category>

		<guid isPermaLink="false">http://www.gzv8.com/?p=125</guid>
		<description><![CDATA[我们使用 curl -I  等软件获取WEB 服务器http 头的时候会返回以下信息：
 HTTP/1.1 200 OK
Server: nginx/0.6.35
Date: Tue, 14 Jul 2009 08:33:01 GMT
Content-Type: text/html
Content-Length: 86
Last-Modified: Tue, 16 Jun 2009 06:55:32 GMT
Connection: keep-alive
Expires: Sat, 18 Jul 2009 08:33:01 GMT
Cache-Control: max-age=345600
Accept-Ranges: bytes
其中 Server: nginx/0.6.35 这个 是 httpd 服务器的版本已经信息。
Nginx 的话可以通过修改源代码 src/core/nginx.h
/*
 * Copyright (C) Igor Sysoev
 */
#ifndef _NGINX_H_INCLUDED_
#define _NGINX_H_INCLUDED_
#define NGINX_VERSION      &#8220;0.6.35&#8243;    
#define NGINX_VER          &#8220;nginx/&#8221; NGINX_VERSION
#define NGINX_VAR          &#8220;NGINX&#8221;
#define NGX_OLDPID_EXT     &#8220;.oldbin&#8221;
#endif [...]]]></description>
			<content:encoded><![CDATA[<p>我们使用 curl -I  等软件获取WEB 服务器http 头的时候会返回以下信息：</p>
<p> HTTP/1.1 200 OK<br />
Server: nginx/0.6.35<br />
Date: Tue, 14 Jul 2009 08:33:01 GMT<br />
Content-Type: text/html<br />
Content-Length: 86<br />
Last-Modified: Tue, 16 Jun 2009 06:55:32 GMT<br />
Connection: keep-alive<br />
Expires: Sat, 18 Jul 2009 08:33:01 GMT<br />
Cache-Control: max-age=345600<br />
Accept-Ranges: bytes</p>
<p>其中 Server: nginx/0.6.35 这个 是 httpd 服务器的版本已经信息。</p>
<p>Nginx 的话可以通过修改源代码 src/core/nginx.h<br />
/*<br />
 * Copyright (C) Igor Sysoev<br />
 */<br />
#ifndef _NGINX_H_INCLUDED_<br />
#define _NGINX_H_INCLUDED_<br />
#define NGINX_VERSION      &#8220;0.6.35&#8243;    <br />
#define NGINX_VER          &#8220;nginx/&#8221; NGINX_VERSION</p>
<p>#define NGINX_VAR          &#8220;NGINX&#8221;<br />
#define NGX_OLDPID_EXT     &#8220;.oldbin&#8221;<br />
#endif /* _NGINX_H_INCLUDED_ */</p>
<p>############# 我把我的改成 #############</p>
<p>/*<br />
 * Copyright (C) Igor Sysoev<br />
 */<br />
#ifndef _NGINX_H_INCLUDED_<br />
#define _NGINX_H_INCLUDED_<br />
#define NGINX_VERSION      &#8220;1.0&#8243;    <br />
#define NGINX_VER          &#8220;GzNow/&#8221; NGINX_VERSION</p>
<p>#define NGINX_VAR          &#8220;GzNow&#8221;<br />
#define NGX_OLDPID_EXT     &#8220;.oldbin&#8221;<br />
#endif /* _NGINX_H_INCLUDED_ */</p>
<p>##########  保存退出之后，就像平时一样编译安装。##########</p>
<p>这样你就有了你自己名字的 httpd 服务器了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gzv8.com/archives/125/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

