<?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>花开的地方 &#187; httpd</title>
	<atom:link href="http://www.bsdmap.com/tag/httpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bsdmap.com</link>
	<description>花开，没有声音……</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:39:21 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19814</generator>
		<item>
		<title>编译安装Apache</title>
		<link>http://www.bsdmap.com/2010/02/03/compile-apache/</link>
		<comments>http://www.bsdmap.com/2010/02/03/compile-apache/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 06:23:10 +0000</pubDate>
		<dc:creator>洪川</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[make]]></category>

		<guid isPermaLink="false">http://www.bsdmap.com/?p=1703</guid>
		<description><![CDATA[温习编译Apahce的相关知识 预备知识 Makefile的惯例 make clean 清除当前目录下在 make 过程中产生的文件。它不能删除软件包的配置文件，也不能删除 build 时创建的那些文件。 make distclean 类似于&#8221;clean&#8221;，但增加删除当前目录下的的配置文件、build 过程产生的文件。 make install-strip 和&#8221;make install&#8221;类似，但是会对复制到安装目录下的可执行文件进行 strip 操作。 make的常用选项 -jN , &#8211;jobs[=N]，指定并行执行的命令数目。 -n &#8211;just-print,&#8211;dry-run,&#8211;recon，只打印出所要执的命令，但并不实际执行命令。 -s &#8211;silent，&#8211;quit，不显示所执行的命令。 编译Apache的要求 磁盘空间 ANSI-C编译器及编译环境 确保准确的时间 Perl 5 [可选] apr/apr-util &#62;= 1.2 apr和apr-util包含在Apache httpd的发行源代码中，并且在绝大多数情况下使用都不会出现问题。当然，如果apr或apr-util的1.0或1.1版本已经安装在你的系统中了，则必须将你的apr/apr-util升级到1.2版本，或者将httpd单独分开编译。要使用发行源代码中自带的apr/apr-util源代码进行安装，你必须手动完成： # 编译和安装 apr 1.2 cd srclib/apr ./configure &#8211;prefix=/usr/local/apr-httpd/ make make install # 编译和安装 apr-util 1.2 [...]]]></description>
			<content:encoded><![CDATA[<h1>温习编译Apahce的相关知识</h1>
<h2>预备知识</h2>
<h3>Makefile的惯例</h3>
<ol>
<li><strong>make clean</strong> 清除当前目录下在 make 过程中产生的文件。它不能删除软件包的配置文件，也不能删除 build 时创建的那些文件。</li>
<li><strong>make distclean</strong> 类似于&#8221;clean&#8221;，但增加删除当前目录下的的配置文件、build 过程产生的文件。</li>
<li><strong>make install-strip</strong> 和&#8221;make install&#8221;类似，但是会对复制到安装目录下的可执行文件进行 <a href="http://www.bsdmap.com/2008/12/07/strip/" target="_blank">strip</a> 操作。</li>
</ol>
<h3>make的常用选项</h3>
<ol>
<li>-jN , &#8211;jobs[=N]，指定并行执行的命令数目。</li>
<li>-n &#8211;just-print,&#8211;dry-run,&#8211;recon，只打印出所要执的命令，但并不实际执行命令。</li>
<li>-s &#8211;silent，&#8211;quit，不显示所执行的命令。</li>
</ol>
<h2>编译Apache的要求</h2>
<ol>
<li>磁盘空间</li>
<li>ANSI-C编译器及编译环境</li>
<li>确保准确的时间</li>
<li>Perl 5 [可选]</li>
<li>apr/apr-util &gt;= 1.2</li>
</ol>
<p style="padding-left: 30px;">apr和apr-util包含在Apache httpd的发行源代码中，并且在绝大多数情况下使用都不会出现问题。当然，如果apr或apr-util的1.0或1.1版本已经安装在你的系统中了，则必须将你的apr/apr-util升级到1.2版本，或者将httpd单独分开编译。要使用发行源代码中自带的apr/apr-util源代码进行安装，你必须手动完成：<br />
# 编译和安装 apr 1.2<br />
cd srclib/apr<br />
./configure &#8211;prefix=/usr/local/apr-httpd/<br />
make<br />
make install</p>
<p style="padding-left: 30px;"># 编译和安装 apr-util 1.2<br />
cd ../apr-util<br />
./configure &#8211;prefix=/usr/local/apr-util-httpd/ &#8211;with-apr=/usr/local/apr-httpd/<br />
make<br />
make install</p>
<p style="padding-left: 30px;"># 配置 httpd<br />
cd ../../<br />
./configure &#8211;with-apr=/usr/local/apr-httpd/ &#8211;with-apr-util=/usr/local/apr-util-httpd/</p>
<h2>Apache的模块状态</h2>
<p>通常我们认为Apache的模块分五类：多路处理模块(MPM)，基本模块(Base)，扩展模块(Extension)，实验性模块(Experimental)，第三方模块(External)。<br />
关于各模块的状态详情可以查看手册。第三方模块不包含在发行版中，手册中只标识了四种状态：</p>
<table border="1" cellspacing="0" cellpadding="0" bordercolor="#aaaaaa">
<tbody>
<tr>
<th>M</th>
<td>多路处理模块</td>
<td>必须有且仅有一个MPM被静态编译到服务器中。</td>
</tr>
<tr>
<th>B</th>
<td>基本模块</td>
<td>默认包含，必须明确禁用。</td>
</tr>
<tr>
<th>E</th>
<td>扩展模块</td>
<td>默认不包含，必须明确启用。</td>
</tr>
<tr>
<th>X</th>
<td>试验模块</td>
<td>默认不包含，必须明确启用。</td>
</tr>
</tbody>
</table>
<h2>Apache的基本模块</h2>
<p>Apache 2.2.14 默认被静态编译进httpd的模块：</p>
<h3>核心模块</h3>
<p>不可或缺<br />
core.c<br />
http_core.c<br />
mod_so.c<br />
prefork.c（Linux上默认是prefork.c）</p>
<h3>认证相关模块</h3>
<p>mod_authn_file.c<br />
mod_authn_default.c<br />
mod_authz_host.c<br />
mod_authz_groupfile.c<br />
mod_authz_user.c<br />
mod_authz_default.c<br />
mod_auth_basic.c</p>
<h3>其它模块</h3>
<p>mod_include.c<br />
mod_filter.c<br />
mod_log_config.c<br />
mod_env.c<br />
mod_setenvif.c<br />
mod_version.c<br />
mod_mime.c<br />
mod_status.c<br />
mod_autoindex.c<br />
mod_asis.c<br />
mod_cgi.c<br />
mod_negotiation.c<br />
mod_dir.c<br />
mod_actions.c<br />
mod_userdir.c<br />
mod_alias.c</p>
<h2>我的Apache的常用模块</h2>
<h3>最简单的认证模块组合</h3>
<p>[B]mod_auth_basic.c 或<br />
[E]mod_auth_digest.c 加 (2.2.14版时，已经由实验模块转为扩展模块)<br />
[B]mod_authn_file.c 加<br />
[B]mod_authz_user.c<br />
注意！basic加密方式密码是明文传送的，不安全，建议使用digest方式的认证。</p>
<h3>保护认证而加载的模块</h3>
<p>[B]mod_authn_default.c<br />
[B]mod_authz_default.c<br />
出于安全考虑，强烈建议加载！</p>
<h3>最常用的访问控制模块</h3>
<p>[B]mod_authz_host.c<br />
提供基与主机名、IP地址以及请求特征的访问控制。</p>
<h3>其它常用模块</h3>
<p>[B]mod_log_config.c<br />
[B]mod_alias.c<br />
[B]mod_dir.c<br />
[B]mod_mime.c<br />
[B]mod_setenvif.c<br />
[E]mod_rewrite.c<br />
[E]mod_deflate.c<br />
[E]mod_expires.c<br />
[E]mod_headers.c</p>
<h2>我常用的编译指令</h2>
<p><code><br />
1. ./configure --prefix=/opt/httpd-2.2.14 --with-mpm=prefork --enable-mods-shared=all LDFLAGS='-s'<br />
2. ./configure --prefix=/opt/httpd-2.2.14 --with-mpm=prefork --enable-mods-shared=all --enable-cache --enable-mem-cache --enable-ssl --enable-file-cache --enable-disk-cache --enable-proxy --enable-proxy-http LDFLAGS='-s'<br />
3. ./configure  --prefix=/opt/httpd-2.2.14 --with-mpm=prefork --enable-mods-shared=all --enable-dir=static --enable-authz-host=static --enable-auth-basic=static --enable-authn_file=static --enable-authz_user=static --enable-authn-default=static --enable-authz-default=static --enable-setenvif=static --enable-alias=static --enable-log-config=static --enable-deflate=static --enable-rewrite=static --enable-mime=static --enable-expires=static --enable-cache=static --enable-mem-cache=static --enable-headers=shared --enable-disk-cache=shared --enable-file-cache=shared LDFLAGS='-s'<br />
</code><br />
注意：因为Apache的./configure生成的Makefile不支持make install-strip，所以使用 LDFLAGES=&#8217;-s&#8217;来编译被strip的代码。</p>
<p>参考：<br />
<a href="http://www.bsdmap.com/articles/linux/inside_config_compile_install.html" target="_blank">深入理解软件包的配置、编译与安装</a><br />
<a href="http://www.bsdmap.com/manuals/Apache/install.html" target="_blank">Apache 2.2 手册-编译与安装</a><br />
<a href="http://www.bsdmap.com/manuals/Apache/dso.html" target="_blank">Apache 2.2 手册-动态共享对象支持</a><br />
<a href="http://www.bsdmap.com/manuals/Apache/mod/index.html" target="_blank">Apache 2.2 手册-各模块的简介描述</a><br />
<a href="http://www.bsdmap.com/manuals/Apache/mod/module-dict.html" target="_blank">Apache 2.2 手册-描述模块的术语</a><br />
<a href="http://www.bsdmap.com/manuals/Apache/mod/quickreference.html" target="_blank">Apache 2.2 手册-指令速查</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdmap.com/2010/02/03/compile-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用基于Apache的 subversion/svn 管理代码</title>
		<link>http://www.bsdmap.com/2009/04/25/httpd-mod_dav_svn/</link>
		<comments>http://www.bsdmap.com/2009/04/25/httpd-mod_dav_svn/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 05:32:56 +0000</pubDate>
		<dc:creator>洪川</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[apahce]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mod_dav_svn]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[svn加密]]></category>
		<category><![CDATA[加密svn密码]]></category>

		<guid isPermaLink="false">http://www.bsdmap.com/?p=1118</guid>
		<description><![CDATA[到版本1.5.6，subversion提供的svnserve搭建的SVN服务器，使用的仍然是名文密码文件。 为了使用加密的密码文件，需要借助于Apache，使用subversion的mod_dav_svn和mod_authz_svn.so，使用基于Apache的认证机制。 假如使用发行版的Apache，那么一般发行版都带了相应的svn模块mod_dav_svn（CentOS）、libapache2-svn（Debian／Ubantu），直接安装即可。 下面主要介绍 源代码安装mod_dav_svn： 下载subversion的源代码：http://subversion.tigris.org/ 与Apaceh相关的两个编译选择： &#8211;with-apxs[=FILE]      Build shared Apache modules. FILE is the optional pathname to the Apache apxs tool; defaults to &#8220;apxs&#8221;. &#8211;with-apache-libexecdir[=PATH] Install Apache modules to PATH instead of Apache&#8217;s configured modules directory; PATH &#8220;no&#8221; or &#8211;without-apache-libexecdir means install to LIBEXECDIR. 一般指定使用 &#8211;with-apxs=［apxs的绝对路径]来编译。默认会安装两个模块到Apache的modules目录内，分别mod_authz_svn.so、mod_dav_svn.so。 配置Apache： 1. 加载SVN依赖的模块 LoadModule dav_module             modules/mod_dav.so LoadModule dav_fs_module         [...]]]></description>
			<content:encoded><![CDATA[<p>到版本1.5.6，subversion提供的svnserve搭建的SVN服务器，使用的仍然是名文密码文件。</p>
<p>为了使用加密的密码文件，需要借助于Apache，使用subversion的<em>mod_dav_svn</em>和<em>mod_authz_svn.so</em>，使用基于Apache的认证机制。</p>
<p>假如使用发行版的Apache，那么一般发行版都带了相应的svn模块mod_dav_svn（CentOS）、libapache2-svn（Debian／Ubantu），直接安装即可。</p>
<p>下面主要介绍</p>
<p><strong>源代码</strong><strong>安装mod_dav_svn：</strong></p>
<p>下载subversion的源代码：http://subversion.tigris.org/</p>
<p>与Apaceh相关的两个编译选择：</p>
<p>&#8211;with-apxs[=FILE]      Build shared Apache modules. FILE is the optional pathname to the Apache apxs tool; defaults to &#8220;apxs&#8221;.<br />
&#8211;with-apache-libexecdir[=PATH] Install Apache modules to PATH instead of Apache&#8217;s configured modules directory; PATH &#8220;no&#8221; or &#8211;without-apache-libexecdir means install to LIBEXECDIR.</p>
<p>一般指定使用 &#8211;with-apxs=［apxs的绝对路径]来编译。默认会安装两个模块到Apache的modules目录内，分别mod_authz_svn.so、mod_dav_svn.so。</p>
<p><strong>配置Apache：</strong></p>
<p>1. 加载SVN依赖的模块</p>
<p>LoadModule dav_module             modules/mod_dav.so<br />
LoadModule dav_fs_module         modules/mod_dav_fs.so<br />
LoadModule dav_svn_module       modules/mod_dav_svn.so<br />
LoadModule authz_svn_module    modules/mod_authz_svn.so</p>
<p>2. 建立svn仓库</p>
<p>svnadmin create /srv/_svndata/isystem<br />
svnadmin create /srv/_svndata/iconfig</p>
<p>3. 配置apache对svn仓库的管理<br />
# 注意，/svn目录不能在你的DocumentRoot目录下。<br />
&lt;Location /svn&gt;<br />
# 启用SVN<br />
DAV svn<br />
# 设置SVN仓库的路径<br />
# SVNPath /srv/_svndata/isystem<br />
# 假如在一个目录下有多个仓库，那么可以使用SVNParentPath来指定多仓库的根目录<br />
# 也可以使用SVNPath来进行单独的设置<br />
SVNParentPath /srv/_svndata</p>
<p>AuthType Basic<br />
AuthName &#8220;Subversion Repository&#8221;<br />
AuthUserFile /etc/apache2/dav_svn.passwd</p>
<p># 设置SVN的权限控制<br />
AuthzSVNAccessFile /etc/apache2/dav_svn.authz</p>
<p>&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
Require valid-user<br />
&lt;/LimitExcept&gt;</p>
<p>&lt;/Location&gt;</p>
<p>4. 添加SVN访问账号</p>
<p>htpasswd /etc/apache2/dav_svn.passwd  caoyuwei</p>
<p>编辑：/etc/apache2/dav_svn.authz</p>
<p>[groups]<br />
admin = caoyuwei<br />
[/]<br />
@admin = rw<br />
[isystem:/]<br />
@admin= rw<br />
[iconfig:/]<br />
@admin=rw</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdmap.com/2009/04/25/httpd-mod_dav_svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>使用ssl加密http协议</title>
		<link>http://www.bsdmap.com/2009/03/25/apache-openssl-ssl-mod_ssl/</link>
		<comments>http://www.bsdmap.com/2009/03/25/apache-openssl-ssl-mod_ssl/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 02:24:47 +0000</pubDate>
		<dc:creator>洪川</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mod_ssl]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://www.bsdmap.com/?p=1109</guid>
		<description><![CDATA[使用mod_ssl模块，使Apache可以使用SSL协议加密HTTP协议，用来保护HTTP会话。 最简洁的配置样例： &#60;VirtualHost _default_:443&#62; ServerName    www.bsdmap.com DocumentRoot  /opt/httpd/htdocs SSLEngine      on SSLCertificateFile        /opt/httpd/conf/ssl/www.bsdmap.com.cert SSLCertificateKeyFile   /opt/httpd/conf/ssl/www.bsdmap.com.key &#60;/VirtualHost&#62; SSLEngine                 ON 启动SSL引擎 SSLCertificateFile       指定证书 SSLCertificateKeyFile  指定相关密钥 使用SSL加密分为正式场合，比如网上银行、支付宝等对应用安全要求较高的应用上；另一个为非正试场合，比如自己也可以配置一个SSL的web服务。区别在于，正式场合https应用使用的SSL证书是经过第三方数字签名的，而非正式应用，则是非正式机构或者是自己制作、签名的。 成生密钥对儿： 在创建证书之前，要有一个共公／私有密钥对儿。以www.bsdmap.com为例： openssl genrsa -des3 -rand file1:file2:file3 -out www.bsdmap.com.key 1024 genrsa：告诉openssl要生成一个RSA的密钥对儿。 des3：表示私钥应该被一个&#8221;pass phrase&#8221;编码和保护。 rand：给OpenSSL提供任意的、随机的数据以确保生成的密钥是唯一的和不可预知的。这个开关在Windows里没有必要，在Windows下使用其他的方式获得随机数据。 out：保存位置。 1024：密钥位数。 当使用了-des3选项，成生了受“口令”保护的密钥对儿时，启动apache时需要输入口令才能启动。假如不想要每次都输入“口令”（不安全），可以使用不受“口令”保护的密钥，去掉-des3选项即可，也可以使用下面的命令转换一下： openssl rsa -in www.bsdmap.com.key -out www.bsdmap.com.key.nopassword 显示密钥文件的信息： openssl rsa -noout -text -in www.bsdmap.com.key 该命令也可用于查看ssh-key的信息，其实质是一样的。   [...]]]></description>
			<content:encoded><![CDATA[<p>使用mod_ssl模块，使Apache可以使用SSL协议加密HTTP协议，用来保护HTTP会话。</p>
<p><span style="color: #ff0000;"><strong>最简洁的配置样例：</strong></span></p>
<p>&lt;VirtualHost _default_:443&gt;<br />
ServerName    www.bsdmap.com<br />
DocumentRoot  /opt/httpd/htdocs<br />
SSLEngine      on<br />
SSLCertificateFile        /opt/httpd/conf/ssl/www.bsdmap.com.cert<br />
SSLCertificateKeyFile   /opt/httpd/conf/ssl/www.bsdmap.com.key<br />
&lt;/VirtualHost&gt;</p>
<p>SSLEngine                 ON 启动SSL引擎<br />
SSLCertificateFile       指定证书<br />
SSLCertificateKeyFile  指定相关密钥</p>
<p>使用SSL加密分为正式场合，比如网上银行、支付宝等对应用安全要求较高的应用上；另一个为非正试场合，比如自己也可以配置一个SSL的web服务。区别在于，正式场合https应用使用的SSL证书是经过第三方数字签名的，而非正式应用，则是非正式机构或者是自己制作、签名的。</p>
<p><span style="color: #ff0000;"><strong>成生密钥对儿：</strong></span></p>
<p>在创建证书之前，要有一个共公／私有密钥对儿。以www.bsdmap.com为例：</p>
<p><strong>openssl genrsa -des3 -rand file1:file2:file3 -out www.bsdmap.com.key 1024</strong></p>
<p>genrsa：告诉openssl要生成一个RSA的密钥对儿。</p>
<p>des3：表示私钥应该被一个&#8221;pass phrase&#8221;编码和保护。</p>
<p>rand：给OpenSSL提供任意的、随机的数据以确保生成的密钥是唯一的和不可预知的。这个开关在Windows里没有必要，在Windows下使用其他的方式获得随机数据。</p>
<p>out：保存位置。</p>
<p>1024：密钥位数。</p>
<p>当使用了-des3选项，成生了受“口令”保护的密钥对儿时，启动apache时需要输入口令才能启动。假如不想要每次都输入“口令”（不安全），可以使用不受“口令”保护的密钥，去掉-des3选项即可，也可以使用下面的命令转换一下：</p>
<p><strong>openssl rsa -in www.bsdmap.com.key -out www.bsdmap.com.key.nopassword</strong></p>
<p>显示密钥文件的信息：</p>
<p><strong>openssl rsa -noout -text -in www.bsdmap.com.key</strong></p>
<p>该命令也可用于查看ssh-key的信息，其实质是一样的。</p>
<p><strong> </strong></p>
<p><span style="color: #ff0000;"><strong>创建一个证书签署请求（正式应用场合）：</strong></span></p>
<p>正式场合的应用，需要一个经证书颁发机构签署的证书，为此，我们先成生一个证书，提交由第三机构签名认证。使用命令：</p>
<p><strong>openssl req -new -key www.bsdmap.com.key -out www.bsdmap.com.csr</strong></p>
<p>需要填写一些地域、组织机构类的信息。需要特殊说明的是：在一个网站站书里，Common Name (eg, YOUR name)一栏标识完全限定的域名（FQDN），假如此处与以后使用证书的站点名不同，浏览器将发布一个错误，无法访问。</p>
<p>完成之后，证书就存储在www.bsdmap.com.csr里。下面的命令可以显示这个证书的信息：</p>
<p><strong>openssl req -noout -text -in www.bsdmap.com.csr</strong></p>
<p>然后，可以所这个证书签署请求提交给一个CA（证书签署机构）处理。</p>
<p>Verisign和Thawte是两家可以选择的CA：</p>
<p>https://digitalid.verisign.com/server/apacheNotice.htm</p>
<p>https://www.thawte.com/ssl-digital-certificates/buy-ssl-certificates/</p>
<p><span style="color: #ff0000;"><strong>创建自签署证书（非正式应用场合）：</strong></span></p>
<p>非正式的应用，可以自己签署自己的证书：</p>
<p><strong>openssl x509 -req -days 365 -in www.bsdmap.com.csr -signkey www.bsdmap.com.key -out www.bsdmap.com.cert</strong></p>
<p>并且，必须使用：chmod 400 www.bsdmap.com.key　来保护密钥文件。</p>
<p><span style="color: #ff0000;"><strong>另一个问题：</strong></span></p>
<p>貌似SSL不能与基于主机名的虚拟主机一同工作。</p>
<p>有一个协议把一个已有的HTTP连接升级到TLS，但是并不是所有的浏览器支持此项功能（RFC 2817）。</p>
<p>参考：<br />
SSL原理解析</p>
<p>http://www.yesky.com/ServerIndex/77125243130347520/20040426/1791592.shtml</p>
<p>SSL原理解密</p>
<p>http://fanqiang.chinaunix.net/a6/b8/20010608/121000441.html</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdmap.com/2009/03/25/apache-openssl-ssl-mod_ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>服务器时间与HTTPD关系</title>
		<link>http://www.bsdmap.com/2009/03/01/httpd-time/</link>
		<comments>http://www.bsdmap.com/2009/03/01/httpd-time/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 12:17:04 +0000</pubDate>
		<dc:creator>洪川</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[时间]]></category>
		<category><![CDATA[时间与http]]></category>

		<guid isPermaLink="false">http://www.bsdmap.com/?p=991</guid>
		<description><![CDATA[发现服务器时间与HTTP应用有关。 当服务器时间慢于标准时间时（也可能是服务器时间是Last-Modified时间的过去时间时），会导致客户端缓存失效，从而产生不必要的流量。]]></description>
			<content:encoded><![CDATA[<p>发现服务器时间与HTTP应用有关。</p>
<p>当服务器时间慢于标准时间时（也可能是服务器时间是Last-Modified时间的过去时间时），会导致客户端缓存失效，从而产生不必要的流量。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdmap.com/2009/03/01/httpd-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache的几个重要模块</title>
		<link>http://www.bsdmap.com/2007/12/14/apache%e7%9a%84%e5%87%a0%e4%b8%aa%e9%87%8d%e8%a6%81%e6%a8%a1%e5%9d%97/</link>
		<comments>http://www.bsdmap.com/2007/12/14/apache%e7%9a%84%e5%87%a0%e4%b8%aa%e9%87%8d%e8%a6%81%e6%a8%a1%e5%9d%97/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 07:57:47 +0000</pubDate>
		<dc:creator>洪川</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[优化]]></category>
		<category><![CDATA[性能优化]]></category>

		<guid isPermaLink="false">http://bsdmap.com/~nix/2007/12/14/apache%e7%9a%84%e5%87%a0%e4%b8%aa%e9%87%8d%e8%a6%81%e6%a8%a1%e5%9d%97/</guid>
		<description><![CDATA[mod_expires 说　明： 允许通过配置文件控制HTTP的&#8221;Expires&#8221;和&#8221;Cache-Control&#8221;头内容 状　态：扩展(E) 模块名：expires_module 源文件：mod_expires.c 概述 这个模块控制服务器应答时的Expires头内容和Cache-Control头的max-age指令。有效期(expiration date)可以设置为相对于源文件的最后修改时刻或者客户端的访问时刻。 这些HTTP头向客户端表明了文档的有效性和持久性。如果有缓存，文档就可以从缓存(除已经过期)而不是从服务器读取。接着，客户端考察缓存中的副本，看看是否过期或者失效，以决定是否必须从服务器获得更新。 要修改Cache-Control头中max-age(参见RFC 2616 section 14.9)项之外的内容，你还可以使用Header指令。]]></description>
			<content:encoded><![CDATA[<h2>mod_expires</h2>
<p>说　明： 允许通过配置文件控制HTTP的&#8221;Expires&#8221;和&#8221;Cache-Control&#8221;头内容<br />
状　态：扩展(E)<br />
模块名：expires_module<br />
源文件：mod_expires.c</p>
<h3>概述</h3>
<p>这个模块控制服务器应答时的<code>Expires</code>头内容和<code>Cache-Control</code>头的<code>max-age</code>指令。有效期(expiration date)可以设置为相对于源文件的最后修改时刻或者客户端的访问时刻。</p>
<p>这些HTTP头向客户端表明了文档的有效性和持久性。如果有缓存，文档就可以从缓存(除已经过期)而不是从服务器读取。接着，客户端考察缓存中的副本，看看是否过期或者失效，以决定是否必须从服务器获得更新。</p>
<p>要修改<code>Cache-Control</code>头中<code>max-age</code>(参见<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">RFC 2616 section 14.9</a>)项之外的内容，你还可以使用<code class="directive"><a href="http://www.bsdmap.com/UNIX_html/ApacheMenu_zh_CN/mod/mod_headers.html#header">Header</a></code>指令。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bsdmap.com/2007/12/14/apache%e7%9a%84%e5%87%a0%e4%b8%aa%e9%87%8d%e8%a6%81%e6%a8%a1%e5%9d%97/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

