<?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>Zelut's Blog &#187; lighttpd</title>
	<atom:link href="http://blog.zelut.org/category/lighttpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zelut.org</link>
	<description>Brain Dump of a Linux Admin</description>
	<lastBuildDate>Sat, 12 Feb 2011 16:31:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Configure Lighttpd for gitweb on FreeBSD</title>
		<link>http://blog.zelut.org/2010/05/23/configure-lighttpd-for-gitweb-on-freebsd/</link>
		<comments>http://blog.zelut.org/2010/05/23/configure-lighttpd-for-gitweb-on-freebsd/#comments</comments>
		<pubDate>Sun, 23 May 2010 21:36:57 +0000</pubDate>
		<dc:creator>Christer</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://blog.zelut.org/?p=184</guid>
		<description><![CDATA[I spent some time this afternoon setting up a public git repository for my project, Origami. I had a little bit of trouble getting the repository set up initially, particularly the cgi aspect of it all. Below outlines the steps I took to configure Lighttpd for gitweb, hosted on FreeBSD. Installation First, of course, I [...]]]></description>
			<content:encoded><![CDATA[<p>I spent some time this afternoon setting up a public git repository for my project, <a title="Origami - The art of Folding@Home" href="http://origami.zelut.org">Origami</a>. I had a little bit of trouble getting the repository set up initially, particularly the cgi aspect of it all. Below outlines the steps I took to configure Lighttpd for gitweb, hosted on FreeBSD.</p>
<p><strong>Installation</strong></p>
<p>First, of course, I installed the git port:</p>
<blockquote><p><code>portmaster devel/git</code></p></blockquote>
<p>I made sure to select the gitweb option, which is de-activated by default. The other options are up to you.</p>
<p><strong>Configuration</strong></p>
<p>Second, I configured Lighttpd in the simplest manner I could find. This solution uses the existing gitweb files in-place. This is contrary to what the pkg-message prescribes, but I like this idea because it&#8217;ll ensure that upgrades are handled automatically. I don&#8217;t plan to run any additional repositories either, so using the one central set of files is preferable in my situation. This is my configuration:</p>
<blockquote><p><code> $HTTP["host"] =~ "^origami.zelut.org" {<br />
$HTTP["url"] =~ "/gitweb/" {<br />
server.indexfiles = ( "gitweb.cgi" )<br />
}<br />
alias.url += ( "/gitweb/" =&gt; "/usr/local/share/examples/git/gitweb/" ),<br />
cgi.assign = ( ".cgi" =&gt; "/usr/bin/perl" )<br />
}<br />
</code></p></blockquote>
<p><strong>Repository Configuration</strong></p>
<p>Lastly, I update the repository configuration in /usr/local/share/examples/git/gitweb/gitweb.cgi to my repository location:</p>
<blockquote><p><code>our $projectroot = "/path/to/git/repository/"</code></p></blockquote>
<p><strong>Conclusion</strong></p>
<p>I find that Lighttpd configuration, once you get used to it, is much simpler than Apache configuration. It&#8217;s all a matter of taking the time to learn the options (and finding examples, like this one) and it gets simpler.</p>
<p>I think this configuration for gitweb is very clean, requires minimal configuration additions, and is hopefully pretty self explanatory. I hope it works for you as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zelut.org/2010/05/23/configure-lighttpd-for-gitweb-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd on FreeBSD : Hard Lock on Upload?</title>
		<link>http://blog.zelut.org/2010/05/02/lighttpd-on-freebsd-hard-lock-on-upload/</link>
		<comments>http://blog.zelut.org/2010/05/02/lighttpd-on-freebsd-hard-lock-on-upload/#comments</comments>
		<pubDate>Sun, 02 May 2010 18:08:46 +0000</pubDate>
		<dc:creator>Christer</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://blog.zelut.org/?p=172</guid>
		<description><![CDATA[Anytime I would upload a file to the server (in my case via Wordpress upload form), the server would hard-lock and I'd have to manually bring it back up.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently migrated my server(s) to a new VPS, one which offers BSD as a hosting option. I have long been a fan of FreeBSD on my servers, so this was a deal I couldn&#8217;t pass up. I did, however, run into one fairly difficult problem based on my combination of FreeBSD and lighttpd web server. I felt it was important to blog about it so that &#8220;teh internets&#8221; could share the wisdom and, hopefully, others could solve this same issue quickly.</p>
<p><strong>Problem</strong></p>
<p>The web server seemed to work great. It was handling traffic efficiently. Logs were going where they were expected. Rewrites were working. All the main things that I would expect to test were working just fine. And then I uploaded a file.</p>
<p>Hard lock. Panic. Do not pass go. Do not collect $200. This was bad.</p>
<p>I was even able to reproduce it. Anytime I would upload a file to the server (in my case via WordPress upload form), the server would hard-lock and I&#8217;d have to manually bring it back up.</p>
<p><strong>Solution</strong></p>
<p>The solution was to manually define the <em>server.network-backend</em> value, instead of using the auto-detected value. Apparently, at the time of this writing, the auto-detection on FreeBSD is.. less than perfect. The solution that I found was to add the following line to my lighttpd.conf:</p>
<blockquote><p><code>server.network-backend = "writev"</code></p></blockquote>
<p>After restarting the lighttpd service things seemed to perform as expected.</p>
<p><strong>Conclusion</strong></p>
<p>FreeBSD is a great, stable hosting platform. Lighttpd is a lightweight, efficient web server. Together they provide me with a very efficient, stable web hosting environment. The simple detail is to define the right parameters for the platform in the configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zelut.org/2010/05/02/lighttpd-on-freebsd-hard-lock-on-upload/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Require Authentication For Multiple Directories in Lighttpd</title>
		<link>http://blog.zelut.org/2009/03/08/require-authentication-for-multiple-directories-in-lighttpd/</link>
		<comments>http://blog.zelut.org/2009/03/08/require-authentication-for-multiple-directories-in-lighttpd/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 02:59:12 +0000</pubDate>
		<dc:creator>Christer</dc:creator>
				<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[auth.require]]></category>

		<guid isPermaLink="false">http://blog.zelut.org/?p=58</guid>
		<description><![CDATA[I have a domain that I use to hold my notes, personal wiki, html versions of books and magazines, and other assorted resources.  Much of this I want to remain private so I&#8217;ve implemented Lighttpd access restrictions at the root of those directories.  I had a little bit of trouble this evening adding additional directories [...]]]></description>
			<content:encoded><![CDATA[<p>I have a domain that I use to hold my notes, personal wiki, html versions of books and magazines, and other assorted resources.  Much of this I want to remain private so I&#8217;ve implemented Lighttpd access restrictions at the root of those directories.  I had a little bit of trouble this evening adding additional directories to my restriction list, so I thought I would make a note of it here.  Hopefully it&#8217;ll help anyone else running into similar trouble.</p>
<blockquote><p><code><br />
$HTTP["host"] =~ "domain.tld" {<br />
auth.require = (<br />
"/secret/" =&gt; (<br />
"method"    =&gt; "basic",<br />
"realm"     =&gt; "Password Protected Area",<br />
"require"   =&gt; "valid-user",<br />
),<br />
"/private/" =&gt; (<br />
"method"    =&gt; "basic",<br />
"realm"     =&gt; "Password Protected Area",<br />
"require"   =&gt; "valid-user",<br />
)<br />
)<br />
}</code></p></blockquote>
<p>The cause of my problem was the missing comma between the directory names.  If you&#8217;re going to limit access to multiple directories in a list like this it needs to be a comma separated list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zelut.org/2009/03/08/require-authentication-for-multiple-directories-in-lighttpd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Database Caching 1/27 queries in 0.013 seconds using disk: basic
Object Caching 277/329 objects using disk: basic

Served from: blog.zelut.org @ 2012-02-07 11:47:51 -->
