<?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>ni kvel &#187; lighttpd</title>
	<atom:link href="http://orz.miroq.info/archives/tag/lighttpd/feed" rel="self" type="application/rss+xml" />
	<link>http://orz.miroq.info</link>
	<description>漠然的な Something を Do しちゃうところ。</description>
	<lastBuildDate>Fri, 29 May 2009 03:56:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>lighttpd で Apache みたいな Customlog</title>
		<link>http://orz.miroq.info/archives/10</link>
		<comments>http://orz.miroq.info/archives/10#comments</comments>
		<pubDate>Fri, 11 Apr 2008 00:43:21 +0000</pubDate>
		<dc:creator>miroq</dc:creator>
				<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://orz.miroq.info/?p=10</guid>
		<description><![CDATA[Lighttpd をやって思ったのは、spawn-cgi から fastcgi に渡して .php .cgi を処理するようにしているので、access.log にローカルで処理した分もでてきちゃう。しかも、blog とかの log だと、.gif とか .jpg とかも入って煩わしい。 Apache の時は、下のように処理してた。 SetEnvIf Request_URI &#8220;\.(gif)&#124;(jpg)&#124;(png)&#124;(css)$&#8221; nolog LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %>s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221;" combined CustomLog /home/hoge/hoge.miroq.info_access.log combined env=!nolog というようことで、実際に lighttpd でやってみた。 下のような感じでできるお。 $HTTP["remoteip"]!~&#8221;^(127\.&#124;192\.168\.)&#8221;{ 　　　　$HTTP["url"] !~ &#8220;\.(gif)&#124;(jpg)&#124;(png)&#124;(css)$&#8221; { 　　　　　　　　accesslog.filename = &#8220;/home/hoge/hoge.miroq.info.access.log&#8221; 　　　　　　　　} 　　　　} 上の場合は 127.0.0.1 / 192.168.X.X と画像関連のファイルを [...]]]></description>
			<content:encoded><![CDATA[<p>Lighttpd をやって思ったのは、spawn-cgi から fastcgi に渡して .php .cgi を処理するようにしているので、access.log にローカルで処理した分もでてきちゃう。しかも、blog とかの log だと、.gif とか .jpg とかも入って煩わしい。</p>
<p>Apache の時は、下のように処理してた。</p>
<blockquote><p>    SetEnvIf Request_URI &#8220;\.(gif)|(jpg)|(png)|(css)$&#8221; nolog<br />
    LogFormat &#8220;%h %l %u %t \&#8221;%r\&#8221; %>s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221;" combined<br />
    CustomLog /home/hoge/hoge.miroq.info_access.log combined env=!nolog
</p></blockquote>
<p>というようことで、実際に lighttpd でやってみた。<br />
下のような感じでできるお。</p>
<blockquote><p>$HTTP["remoteip"]!~&#8221;^(127\.|192\.168\.)&#8221;{<br />
　　　　$HTTP["url"] !~ &#8220;\.(gif)|(jpg)|(png)|(css)$&#8221; {<br />
　　　　　　　　accesslog.filename              = &#8220;/home/hoge/hoge.miroq.info.access.log&#8221;<br />
　　　　　　　　}<br />
　　　　}</p></blockquote>
<p>上の場合は 127.0.0.1 / 192.168.X.X と画像関連のファイルを acccesslog に吐かないようにした。<br />
remoteip / url を逆にしてやってみたけど、だめだた。たぶん Request の評価の順番が、 remoteip > url なのだろう。考えればそのような気もするけどｗ</p>
]]></content:encoded>
			<wfw:commentRss>http://orz.miroq.info/archives/10/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
		<item>
		<title>lighttpd で wordpress を使うには</title>
		<link>http://orz.miroq.info/archives/6</link>
		<comments>http://orz.miroq.info/archives/6#comments</comments>
		<pubDate>Sun, 16 Mar 2008 00:29:15 +0000</pubDate>
		<dc:creator>miroq</dc:creator>
				<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://orz.miroq.info/archives/6</guid>
		<description><![CDATA[lighttpd は Apache と違い、.htaccess のような個人ごとに制御を分離させることはできない。 そのため、wordpress にて redirect を使う方法をとってしまうと、大本の conf ファイルである lighttpd.conf に記述されないと動いてくれない。 wordpress を lighttpd で使うには、以下を lighttpd.conf に追加する。 url.rewrite = ( 　　　　　　　　　&#8221;^/(wp-.+).*/?&#8221; => &#8220;$0&#8243;, 　　　　　　　　　&#8221;^/(sitemap.xml)&#8221; => &#8220;$0&#8243;, 　　　　　　　　　&#8221;^/(xmlrpc.php)&#8221; => &#8220;$0&#8243;, 　　　　　　　　　&#8221;^/(.+)/?$&#8221; => &#8220;/index.php/$1&#8243; 　　　　) lighttpd を再起動後問題なく動くことを確認できた。 lighttpd と Apache を ab でベンチとったけど ( ab -n 10000 -c 100 http://orz.miroq.info/ ) Apache では途中 defunct になってしまうものもあった。そしてプロセスが死骸みたいにのこって [...]]]></description>
			<content:encoded><![CDATA[<p>lighttpd は Apache と違い、.htaccess のような個人ごとに制御を分離させることはできない。<br />
そのため、wordpress にて redirect を使う方法をとってしまうと、大本の conf ファイルである lighttpd.conf に記述されないと動いてくれない。</p>
<p>wordpress を lighttpd で使うには、以下を lighttpd.conf に追加する。</p>
<blockquote><p>        url.rewrite = (<br />
　　　　　　　　　&#8221;^/(wp-.+).*/?&#8221; => &#8220;$0&#8243;,<br />
　　　　　　　　　&#8221;^/(sitemap.xml)&#8221; => &#8220;$0&#8243;,<br />
　　　　　　　　　&#8221;^/(xmlrpc.php)&#8221; => &#8220;$0&#8243;,<br />
　　　　　　　　　&#8221;^/(.+)/?$&#8221; => &#8220;/index.php/$1&#8243;<br />
　　　　)</p></blockquote>
<p>lighttpd を再起動後問題なく動くことを確認できた。<br />
lighttpd と Apache を ab でベンチとったけど ( ab -n 10000 -c 100 http://orz.miroq.info/ )<br />
Apache では途中 defunct になってしまうものもあった。そしてプロセスが死骸みたいにのこって 80 番ポートを占拠しやがるｗ</p>
<p>そして、現在 lighttpd で運用中。 virtual host を include で別ファイルにおけないかどうか思案中。<br />
たぶん余裕でおけるんだけどねｗ</p>
]]></content:encoded>
			<wfw:commentRss>http://orz.miroq.info/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="" length="" type="" />
		</item>
	</channel>
</rss>

