<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post/103/</link>
<title><![CDATA[配制lighttpd+fastcgi启动脚本]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Lighttpd]]></category>
<pubDate>Thu, 22 May 2008 08:48:12 +0000</pubDate> 
<guid>https://blog.liuts.com/post/103/</guid> 
<description>
<![CDATA[ 
	<strong>一、vi /etc/init.d/webserver</strong><br/><textarea name="code" class="shell" rows="15" cols="100">
#!/bin/bash
# chkconfig: 35 95 1
# description: script to start/stop/restart webserver

case $1 in
start)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033
;;
stop)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;killall lighttpd
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kill -9 `ps -ef&#124;grep manage.py&#124;grep -v grep&#124;awk &#123;'print $2'&#125;`
;;
restart)
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;killall lighttpd
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;kill -9 `ps -ef&#124;grep manage.py&#124;grep -v grep&#124;awk &#123;'print $2'&#125;`
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd /www/webserver && /usr/local/bin/python ./manage.py runfcgi method=threaded host=127.0.0.1 port=3033
;;
*)
echo "Usage: $0 (start&#124;stop&#124;restart)"
;;
esac
</textarea><br/><strong>二、配置成服务</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">chmod 775 webserver<br/>chkconfig --add webserver<br/>service webserver restart</div></div><br/>Tags - <a href="https://blog.liuts.com/tags/lighttpd/" rel="tag">lighttpd</a> , <a href="https://blog.liuts.com/tags/fast-cgi/" rel="tag">fast-cgi</a> , <a href="https://blog.liuts.com/tags/%25E5%2590%25AF%25E5%258A%25A8%25E8%2584%259A%25E6%259C%25AC/" rel="tag">启动脚本</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/86/</link>
<title><![CDATA[lighttpd配制HTTP压缩]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Lighttpd]]></category>
<pubDate>Sat, 22 Sep 2007 07:16:16 +0000</pubDate> 
<guid>https://blog.liuts.com/post/86/</guid> 
<description>
<![CDATA[ 
	静态文件压缩<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>compress.cache-dir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = "/tmp/lighttpd/cache/compress"<br/>compress.filetype&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= ("text/plain", "text/html","text/javascript","text/css")<br/></div></div><br/>可以指定某些静态资源类型使用压缩方式传输，节省带宽，对于大量AJAX应用来说，可以极大提高页面加载速度。<br/><br/>Tags - <a href="https://blog.liuts.com/tags/lighttpd/" rel="tag">lighttpd</a> , <a href="https://blog.liuts.com/tags/gzip/" rel="tag">gzip</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post/63/</link>
<title><![CDATA[配制lighttpd mod_mem_cache模块文档]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Lighttpd]]></category>
<pubDate>Tue, 21 Aug 2007 15:38:41 +0000</pubDate> 
<guid>https://blog.liuts.com/post/63/</guid> 
<description>
<![CDATA[ 
	#cd lighttpd-1.4.13<br/>#wget http://www.linux.com.cn/doc/lighttpd-1.4.13.mod_mem_cache.v1.2.patch<br/>#patch -p0 < ./lighttpd-1.4.13.mod_mem_cache.v1.2.patch<br/>#./configure --prefix=/usr/local/lighttpd<br/>#make && make install<br/>#vi /usr/local/lighttpd/etc/lighttpd.conf<br/>一、添加模块：server.modules&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= (<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"mod_mem_cache",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.<br/><br/>)二、配制参数：<br/>只对image.tianya.cn站点起作用，默认是全局。<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>mem-cache.enable = "disable"<br/>$HTTP["host"] == "image.tianya.cn" &#123;<br/>&nbsp;&nbsp;server.document-root = "/www/master/image/"<br/>&nbsp;&nbsp;index-file.names&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= ( "index.shtml", "index.html",<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"index.htm", "default.htm" )<br/>&nbsp;&nbsp;mem-cache.enable = "enable"<br/>&nbsp;&nbsp;mem-cache.filetypes&nbsp;&nbsp;= ("application/x-javascript", "text/css", "text/html", "text/javascript")<br/>&nbsp;&nbsp;mem-cache.max-memory = 1024<br/>&nbsp;&nbsp;mem-cache.max-file-size = 1024<br/>&nbsp;&nbsp;mem-cache.expire-time = 180<br/>&#125;<br/></div></div><br/>#kill lighttpd进程PID<br/>#/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf<br/>搞定！<br/>Tags - <a href="https://blog.liuts.com/tags/lighttpd/" rel="tag">lighttpd</a> , <a href="https://blog.liuts.com/tags/mod_mem_cache/" rel="tag">mod mem cache</a>
]]>
</description>
</item>
</channel>
</rss>