<?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>ubuntu,debian,redhat -linuxany.com &#187; Apache</title>
	<atom:link href="http://www.linuxany.com/archives/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxany.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 08:59:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Apache 记录代理后的用户来源ip</title>
		<link>http://www.linuxany.com/archives/1613.html</link>
		<comments>http://www.linuxany.com/archives/1613.html#comments</comments>
		<pubDate>Tue, 09 Aug 2011 15:29:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1613</guid>
		<description><![CDATA[前端nginx代理设置： proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 后端apache设置： LogFormat &#34;%{X-Forwarded-For}i %l %u %t \&#34;%r\&#34; %&#62;s %b \&#34;%{Referer}i\&#34;\&#34;%{User-Agent}i\&#34;&#34; common 就可以接收到源ip了。 您还可能感兴趣的内容Nginx 让浏览器告诉你负载均衡分到了哪台服务器负载均衡软件比较(HA/LVS/Nginx)Nginx 支持PATH_INFONginx 502 Bad Gateway错误及解决方案收集Nginx 性能优化（突破十万并发）]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1613.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 在代理后显示正确的用户IP</title>
		<link>http://www.linuxany.com/archives/1478.html</link>
		<comments>http://www.linuxany.com/archives/1478.html#comments</comments>
		<pubDate>Sat, 05 Feb 2011 07:05:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[combined]]></category>
		<category><![CDATA[CustomLog]]></category>
		<category><![CDATA[logformat]]></category>
		<category><![CDATA[SetEnvIf]]></category>
		<category><![CDATA[X-Forwarder-For]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1478</guid>
		<description><![CDATA[apache日志中默认有%h来指定来访客户端你的ip地址，但是如果客户端使用了代理上网则%h获得的ip地址会不准。可以设定 X-Forwarded-For 参数来获取客户端真实的ip地址 对于使用了反向代理的客户端，跟踪真实的ip地址 %{X-Forwarded-For}i &#160; LogFormat &#34;%{X-Forwarder-For}i %l %u %t \&#34;%r\&#34; %&#62;s %b \&#34;%{Referer}i\&#34; \&#34;%{User-Agent}i\&#34;&#34; linuxanyproxy LogFormat &#34;%h %l %u %t \&#34;%r\&#34; %&#62;s %b \&#34;%{Referer}i\&#34; \&#34;%{User-Agent}i\&#34;&#34; combined &#160; SetEnvIf X-Forwarder-For &#34;^.*\..*\..*\..*&#34; is-forwarder &#160; CustomLog logs/access_log combined env=!is-forwarder CustomLog logs/access_log linuxanyproxy env=is-forwarder 需要注意的地方： 1、使用正向代理的客户端，为了安全因素，在连接外部网络之前内部代理（网关）会去掉原有的X-Forwarded-For信息，这种情况server端可以信任X-Forwarded-For信息，表明连接出自某个内部网络。 2、如果server端使用了反向代理（比如server在7层代理的后面），这种情况就不能完全信任X-Forwarded-For信息，最好使用一个白名单来进行控制。 3、如果通过了多级反向代理的话，X-Forwarded-For的值并不止一个，而是一串ip值，究竟哪个才是真正的用户端的真实IP呢？ X-Forwarded-For: client1, proxy1, proxy2 X-Forwarded-For会取得第一个非unknown的有效IP字符串。 您还可能感兴趣的内容Apache Logs: how long [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1478.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>apache CGI程序的简单配置与使用</title>
		<link>http://www.linuxany.com/archives/1282.html</link>
		<comments>http://www.linuxany.com/archives/1282.html#comments</comments>
		<pubDate>Wed, 26 May 2010 12:19:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[scriptalias]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1282</guid>
		<description><![CDATA[添加虚拟主机 &#60;virtualhost 127.0.0.1:50001&#62;&#60;/virtualhost&#62; 这里新添加了50001端口来进行监听，所以还需要添加监听端口号 Listen 50001要让程序能正常运行，还得通过配置ScriptAlias来允许服务器在指定的情况下，以CGI方式运行。 &#60;virtualhost 127.0.0.1:50001&#62;ScriptAlias /cgi-bin/ /usr/local/apache/cgi-bin/&#60;/virtualhost&#62; 所以上述的配置会告诉apache，所以以/cgi-bin/开头的资源都会被映射到/usr/local/apache/cgi-bin/目录下，并被认为是cgi程序。然后重启服务器 在apache/cgi-bin/目录里有一些测试例子，我们可能用它来测试下，看看配置是否能正常运行。 比如说apache/cgi-bin/目录下有个test-cgi程序，源码如下： #!/bin/sh&#160;# This article come from linxuany.comset -f&#160;echo &#34;Content-type: text/plain; charset=iso-8859-1&#34;echo&#160;echo CGI/1.0 test script report:echo&#160;echo argc is $#. argv is &#34;$*&#34;.echo&#160;echo SERVER_SOFTWARE = $SERVER_SOFTWAREecho SERVER_NAME = $SERVER_NAMEecho GATEWAY_INTERFACE = $GATEWAY_INTERFACEecho SERVER_PROTOCOL = $SERVER_PROTOCOLecho SERVER_PORT = $SERVER_PORTecho REQUEST_METHOD = $REQUEST_METHODecho HTTP_ACCEPT = &#34;$HTTP_ACCEPT&#34;echo PATH_INFO [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1282.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>给Tomcat,Apache配置gzip压缩(HTTP压缩)功能</title>
		<link>http://www.linuxany.com/archives/663.html</link>
		<comments>http://www.linuxany.com/archives/663.html#comments</comments>
		<pubDate>Thu, 04 Dec 2008 08:46:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Tomcat]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[mod_deflate]]></category>
		<category><![CDATA[mod_gzip]]></category>
		<category><![CDATA[mod_headers]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=663</guid>
		<description><![CDATA[HTTP 压缩可以大大提高浏览网站的速度，它的原理是，在客户端请求网页后，从服务器端将网页文件压缩，再下载到客户端，由客户端的浏览器负责解压缩并浏览。相对于普通的浏览过程HTML ,CSS,Javascript , Text ，它可以节省40%左右的流量。更为重要的是，它可以对动态生成的，包括CGI、PHP , JSP , ASP , Servlet,SHTML等输出的网页也能进行压缩，压缩效率惊人。 一，对于Tomcat5.0以后的版本是支持对输出内容进行压缩的.　使用的是gzip压缩格式 下面是tomcat5.5.20 中的$tomcat_home$/conf/server.xml的原内容 1&#160; &#160; &#160; &#160;&#60; Connector&#160; port =&#34;80&#34;&#160; maxHttpHeaderSize =&#34;8192&#34; &#160;2&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; maxThreads =&#34;150&#34;&#160; minSpareThreads =&#34;25&#34;&#160; maxSpareThreads =&#34;75&#34; &#160;3&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; enableLookups =&#34;false&#34;&#160; redirectPort =&#34;8443&#34;&#160; acceptCount =&#34;100&#34; &#160;4&#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/663.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mod_gzip进行Apache的HTTP压缩优化</title>
		<link>http://www.linuxany.com/archives/658.html</link>
		<comments>http://www.linuxany.com/archives/658.html#comments</comments>
		<pubDate>Thu, 04 Dec 2008 07:57:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=658</guid>
		<description><![CDATA[HTTP压缩对于纯文本内容可压缩至原大小的40％一下，从而提供60％以上的数据传输节约，虽然WEB服务器会因为压缩导致CPU占用的略微上升，但是可以节约大量用于传输的网络IO。对于数据压缩带来的用户浏览速度提升（让页面符合8秒定律），这点总体负载5%-10%上升是非常值得的。毕竟通过数据压缩会比通过不规范的HTML代码优化要方便得多。 &#60;IFModule mod_gzip.c&#62;AddType text/html .aspAddType text/html .aspxmod_gzip_on Yesmod_gzip_dechunk yesmod_gzip_keep_workfiles Nomod_gzip_minimum_file_size 3000mod_gzip_maximum_file_size 300000 mod_gzip_item_include file \.html$mod_gzip_item_include file \.asp$mod_gzip_item_include file \.aspx$mod_gzip_item_include mime text/.*mod_gzip_item_include mime httpd/unix-directorymod_gzip_item_include handler proxy-server&#60;/IFModule&#62; 参考资料： mod_gzip的下载 http://sourceforge.net/projects/mod-gzip/ mod_gzip项目首页 http://www.schroepl.net/projekte/mod_gzip/ 您还可能感兴趣的内容给Tomcat,Apache配置gzip压缩(HTTP压缩)功能Nginx concat模块减轻http请求连接数Nginx 让浏览器告诉你负载均衡分到了哪台服务器Apache 记录代理后的用户来源ipPython 抓包获取网卡字节流]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/658.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improving Page Load Times(提升页面加载时间)</title>
		<link>http://www.linuxany.com/archives/645.html</link>
		<comments>http://www.linuxany.com/archives/645.html#comments</comments>
		<pubDate>Tue, 02 Dec 2008 09:00:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=645</guid>
		<description><![CDATA[There are a number of ways to improve the amount of time it takes visitors to load your Drupal powered web site. Measurements There are many tools that can be used to measure page load performance on your website. Here are some that we recommend. YSlow FireFox add-on The YSlow FireFox add-on is maintained by [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/645.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache:rewrite的重写相关的参数</title>
		<link>http://www.linuxany.com/archives/613.html</link>
		<comments>http://www.linuxany.com/archives/613.html#comments</comments>
		<pubDate>Fri, 28 Nov 2008 09:22:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://www.linuxlaptop.cn/?p=613</guid>
		<description><![CDATA[Apache mod_rewrite规则重写的标志一览 R[=code](force redirect) 强制外部重定向 强制在替代字符串加上http://thishost[:thisport]/前缀重定向到外部的URL.如果code不指定，将用缺省的302 HTTP状态码。 F(force URL to be forbidden)禁用URL,返回403HTTP状态码。 G(force URL to be gone) 强制URL为GONE，返回410HTTP状态码。 P(force proxy) 强制使用代理转发。 L(last rule) 表明当前规则是最后一条规则，停止分析以后规则的重写。 N(next round) 重新从第一条规则开始运行重写过程。 C(chained with next rule) 与下一条规则关联 如果规则匹配则正常处理，该标志无效，如果不匹配，那么下面所有关联的规则都跳过。 T=MIME-type(force MIME type) 强制MIME类型 NS (used only if no internal sub-request) 只用于不是内部子请求 NC(no case) 不区分大小写 QSA(query string append) 追加请求字符串 NE(no URI escaping [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/613.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

