<?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; http</title>
	<atom:link href="http://www.linuxany.com/archives/tag/http/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>Nginx concat模块减轻http请求连接数</title>
		<link>http://www.linuxany.com/archives/1937.html</link>
		<comments>http://www.linuxany.com/archives/1937.html#comments</comments>
		<pubDate>Tue, 20 Dec 2011 06:01:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[concat]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[request]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1937</guid>
		<description><![CDATA[nginx_concat_module是淘宝开发的基于Nginx减少HTTP请求数量的扩展模块,主要是用于合并减少前段用户Request的HTTP请求的数量。 taobao.com使用concat_module 进行css样式合并 安装： 可以从这里 checkout 最新的代码， svn checkout http://code.taobao.org/svn/nginx_concat_module/trunk/ $NGINX_CONCAT_MODULE 然后下载适合你自己版本的 nginx 源码包，在 ./configure 中增加参数 &#8211;add-module=$NGINX_CONCAT_MODULE cd /us/local/src wget http://nginx.org/download/nginx-1.0.10.tar.gz tar xzvf nginx-1.0.10.tar.gz cd nginx-1.0.10/ ./configure --user=www --group=www&#160; \ --prefix=/usr/local/nginx \ --with-http_stub_status_module&#160; \ --with-http_sub_module&#160; &#160; \ --with-http_flv_module&#160; &#160;\ --with-http_gzip_static_module&#160; &#160;\ --add-module=../nginx_concat_module/&#160; make &#38;&#38; make install 使用方法： location /temp/ { &#160;&#160; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1937.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx 让浏览器告诉你负载均衡分到了哪台服务器</title>
		<link>http://www.linuxany.com/archives/1902.html</link>
		<comments>http://www.linuxany.com/archives/1902.html#comments</comments>
		<pubDate>Fri, 02 Dec 2011 08:46:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nginx]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[http]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1902</guid>
		<description><![CDATA[在大型网站的架构中，通常需要多台web服务器同时为用户服务，那么，如何直观地了解代理将请求转向了哪台机器呢？ 幸运的是，我们可以通过Nginx的add_header指令配合Firefox的插件header spy相结合来实现上面提到的问题。 首先，修改nginx的配置 然后安装Firefox的插件，并增加一个监测项： 用FF打开，可以在浏览器状态栏看到： 这样就可以很清楚地知道程序当前运行在哪台web服务器上。若Web服务器是Apache，也可以实现。 Nginx的add_header指令介绍 http://wiki.nginx.org/HttpHeadersModule 您还可能感兴趣的内容利用telnet取http头信息Nginx concat模块减轻http请求连接数CSS 清除页面中多余的样式负载均衡软件比较(HA/LVS/Nginx)Nginx 支持PATH_INFO]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1902.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python 抓包获取网卡字节流</title>
		<link>http://www.linuxany.com/archives/1558.html</link>
		<comments>http://www.linuxany.com/archives/1558.html#comments</comments>
		<pubDate>Sat, 07 May 2011 07:39:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[dpkt]]></category>
		<category><![CDATA[eth0]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[pypcap]]></category>
		<category><![CDATA[tcp]]></category>
		<category><![CDATA[udp]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1558</guid>
		<description><![CDATA[import pcap&#160; &#160; &#160; import&#160;dpkt&#160; &#160; &#160; &#160; &#160; &#160; aaa='a'&#160; &#160; &#160; bbb='b'&#160; &#160; &#160; pc=pcap.pcap()&#160; &#160; #注，参数可为网卡名，如eth0&#160; &#160; &#160; pc.setfilter('tcp port 80')&#160; &#160; #设置监听过滤器&#160; &#160; &#160; &#160; &#160; &#160; for&#160;ptime,pdata in pc:&#160; &#160; #ptime为收到时间，pdata为收到数据&#160; &#160; &#160; &#160; &#160; p=dpkt.ethernet.Ethernet(pdata)&#160; &#160; &#160; &#160; &#160; if&#160;p.data.__class__.__name__=='IP':&#160; &#160; &#160; &#160; &#160; &#160; &#160; ip='%d.%d.%d.%d'%tuple(map(ord,list(p.data.dst)))&#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1558.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd 虚拟主机和多域名的配置</title>
		<link>http://www.linuxany.com/archives/1516.html</link>
		<comments>http://www.linuxany.com/archives/1516.html#comments</comments>
		<pubDate>Mon, 28 Mar 2011 09:14:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[host]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1516</guid>
		<description><![CDATA[Lighttpd也是一款轻巧不错的web服务器，和apachehttpserver一样，我最开始用lighttpd是在07年的时候，刚好lighttpd支持flv的流媒体播放和防盗链功能，所以就要用了起来。今天这里着重讲下如何配置多个虚拟主机和域名的设置，以Lighttpd的V1.7版本为例： 1、配置多个虚拟主机 打开Lighttpd安装目录下的etc/lighttpd.conf文件，在最后添加如下段： $HTTP[&#34;host&#34;] == &#34;www.linuxany.com&#34; {&#160;&#160; &#160;server.document-root = &#34;/webapps/linuxany/website&#34;&#160;&#160; &#160;server.errorlog = &#34;/usr/local/lighttpd/logs/linuxany.com-error.log&#34;&#160;&#160; &#160;accesslog.filename = &#34;/usr/local/lighttpd/logs/linuxany.com-access.log&#34;} 如果需要多个虚拟主机，则将上面的段复制设置多个即可。 2、多域名指向同一个目录 有时候我们需要将同一个应用配置多个域名，这时我们就可以采用下面的段来进行配置： $HTTP[&#34;host&#34;] =~ &#34;^(python\.linuxany\.com&#124;perl\.linuxany\.com)$&#34; {&#160;&#160; &#160;server.document-root = &#34;/linuxany/program/app&#34;&#160;&#160; &#160;server.errorlog = &#34;/usr/local/lighttpd/logs/linuxany-app-error.log&#34;&#160;&#160; &#160;accesslog.filename = &#34;/usr/local/lighttpd/logs/linuxany-app-access.log&#34;} 注意这个与单个域名配置不同的是：前者使用的是==，而后者使用的是=~这样，这样我们就完成了一个应用多个域名的配置了，然后重启lightpd即可。 3、多个域名跳转到同一个域名，可带路径 $HTTP[&#34;host&#34;] =~ &#34;^(python\.linuxany\.com&#124;perl\.linuxany\.com&#124;php\.linuxany\.com)$&#34; {&#160;&#160; &#160; &#160; url.redirect = ( &#34;^/(.*)&#34; =&#62; &#34;http://www.linuxany.com/$1&#34; )} 您还可能感兴趣的内容Nginx concat模块减轻http请求连接数Nginx 让浏览器告诉你负载均衡分到了哪台服务器Python 进行DNS解析监控Python 抓包获取网卡字节流Nginx proxy_pass到$host的问题与解决方法]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1516.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>js和css文件混合方法</title>
		<link>http://www.linuxany.com/archives/1352.html</link>
		<comments>http://www.linuxany.com/archives/1352.html#comments</comments>
		<pubDate>Sun, 29 Aug 2010 06:24:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[7.Schema]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://www.linuxany.com/?p=1352</guid>
		<description><![CDATA[在页面中你引入了越多的外部文件你的页面加载速度就会越慢。 很典型的web页面都会引入很多的js和css文件，这些都会导致资源的浪费，现在最好的办法就是指引入一份的js文件和一份css文件。毫无疑问，这可以很好的帮助你启动PLT（页面加载时间）。 但是如果您认为，两份文件仍然不够理想，那么现在我们将看到一个技巧将js和css混合成一份文件。我是在搞ms的msn live 的页面优化时发现这个小技巧的。 这个技巧依赖于ie或是ff如何去解读css和js的行为。 当css解析器遇到一个html的注释标记当js的解析器遇到这个标记时，他会将它看成是//,因此后面的所有代码都会被当作注释。 好了，看看下面的代码： function show(){ alert(‘hello’) } 这段代码我们看看，分别由css解析和js解析之后的结果。 Css: /* function show(){alert(‘hello’)} */ Body {…} Js: // /* function show(){…} // */ //body{…} 真是不错啊，在js和css 解析里面都能够得到他们自己想的内容，而不被其他内容所混淆，挺讨巧的一个方法。以后你就可以这样引用了： 这个test.jscss文件就是你需要的。还有一点就是response的content type应该设置成 */*否则ff里面有可能把它当成其他任何东西。 注意：js代码中要取消掉多行注释。 您还可能感兴趣的内容完美实现垂直水平居中的 DIVPython 执行js的2种解决方案Nginx concat模块减轻http请求连接数CSS 清除页面中多余的样式Nginx 让浏览器告诉你负载均衡分到了哪台服务器]]></description>
		<wfw:commentRss>http://www.linuxany.com/archives/1352.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>
	</channel>
</rss>

