<?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>Li Yue [学习笔记] &#187; apache</title>
	<atom:link href="http://www.liyue.org/tech/archives/category/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.liyue.org/tech</link>
	<description>技术笔记</description>
	<lastBuildDate>Sun, 18 Jul 2010 02:14:54 +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>Apache自定义错误信息并跳转到各自网站首页</title>
		<link>http://www.liyue.org/tech/archives/203</link>
		<comments>http://www.liyue.org/tech/archives/203#comments</comments>
		<pubDate>Fri, 08 Jan 2010 06:06:01 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[web优化]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=203</guid>
		<description><![CDATA[一、自定义错误信息页面，并根据所请求的URL所在的域，跳转到所在域名。
二、自定义APACHE错误信息，指定错误信息页面。配置文件里面有例子信息，去掉下面的注释符号#，激活。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    Alias /error/ &#34;/usr/local/apache2/error/&#34;
&#160;
    &#60;Directory &#34;/usr/local/apache2/error&#34;&#62;
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
      [...]]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/203/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache性能优化之启用gzip压缩</title>
		<link>http://www.liyue.org/tech/archives/199</link>
		<comments>http://www.liyue.org/tech/archives/199#comments</comments>
		<pubDate>Mon, 30 Nov 2009 13:36:39 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[web优化]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[mod_deflate]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=199</guid>
		<description><![CDATA[首先查看apache是否加载了mod_deflate.so模块，如果没有需要安装加载。
找到并下载和当前apache版本相同的源码文件，解压缩到/home目录下，
在apache安装目录下执行：

/usr/local/apache2/bin/apxs -i -c /home/httpd-2.0.63/modules/filters/mod_deflate.c

会自动在 httpd.conf添加

LoadModule deflate_module modules/mod_deflate.so

添加如下设置：

&#60;IfModule mod_deflate.c&#62;
&#60;Location /&#62;
#Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems…    
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems 
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.59
# the [...]]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/199/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache安全性调整</title>
		<link>http://www.liyue.org/tech/archives/197</link>
		<comments>http://www.liyue.org/tech/archives/197#comments</comments>
		<pubDate>Mon, 30 Nov 2009 12:44:00 +0000</pubDate>
		<dc:creator>李悦</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[web优化]]></category>

		<guid isPermaLink="false">http://www.liyue.org/tech/?p=197</guid>
		<description><![CDATA[对 web服务器进行安全性端口扫描，发现一些问题，apache加以调整：
1、HTTP TRACE method
   需要关闭HTTP TRACE 方法，检测apache是否打开了trace方法，使用如下方法：

  telnet 127.0.0.1 80

   Trying 127.0.0.1&#8230;
Connected to 127.0.0.1.
Escape character is &#8216;^]&#8217;.

TRACE / HTTP/1.0
Host: foo

然后按两次回车，出现下面的信息，证明方法激活了。
HTTP/1.1 200 OK
Date: Sat, 20 Oct 2007 20:39:36 GMT
Server: Apache/2.2.6 (Debian)
Connection: close
Content-Type: message/http
TRACE / HTTP/1.0
Host: foo
否则会出现：
HTTP/1.1 403 Forbidden
等信息。
解决方法：修改httpd.conf，修改如下数值：TraceEnable Off
2、隐藏apache版本等信息：
访问一个不存在的页面，apache会报如下错误：
Not Found
The requested URL /ss.c was not found on this server.
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
Apache/2.0.63 (Unix) DAV/2 [...]]]></description>
		<wfw:commentRss>http://www.liyue.org/tech/archives/197/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
