<?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>The WebZappr &#187; apache</title>
	<atom:link href="http://blog.webzappr.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.webzappr.com</link>
	<description>My Random Web Snippets</description>
	<lastBuildDate>Wed, 03 Mar 2010 00:31:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>lighttpd for image hosting</title>
		<link>http://blog.webzappr.com/2008/10/lighttpd-for-image-hosting/</link>
		<comments>http://blog.webzappr.com/2008/10/lighttpd-for-image-hosting/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 14:18:08 +0000</pubDate>
		<dc:creator>Thorsten</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lighttpd]]></category>

		<guid isPermaLink="false">http://snipplr.wordpress.com/2008/10/10/lighttpd-for-image-hosting/</guid>
		<description><![CDATA[In order to take some work of the webserver I recently installed a lighttpd server for delivery of static files.
The following tuning did the job (thanks to the video sharing script)
/etc/lighttpd/lighttpd.conf

server.max-keep-alive-requests = 4
server.max-keep-alive-idle = 4
server.event-handler = &#34;linux-sysepoll&#34;
server.network-backend = &#34;linux-sendfile&#34;
server.max-fds = 8192
server.stat-cache-engine = &#34;fam&#34;

/etc/sysctl.conf

# These ensure that TIME_WAIT ports either get reused or closed fast.
net.ipv4.tcp_fin_timeout = [...]]]></description>
			<content:encoded><![CDATA[<p>In order to take some work of the webserver I recently installed a lighttpd server for delivery of static files.</p>
<p>The following tuning did the job (thanks to <a href="http://www.videosharingscript.com/image-hosting/optimizing-lighttpd-for-image-hosting/trackback/" target="_blank">the video sharing script</a>)</p>
<p>/etc/lighttpd/lighttpd.conf</p>
<pre class="brush: css;">
server.max-keep-alive-requests = 4
server.max-keep-alive-idle = 4
server.event-handler = &quot;linux-sysepoll&quot;
server.network-backend = &quot;linux-sendfile&quot;
server.max-fds = 8192
server.stat-cache-engine = &quot;fam&quot;
</pre>
<p>/etc/sysctl.conf</p>
<pre class="brush: css;">
# These ensure that TIME_WAIT ports either get reused or closed fast.
net.ipv4.tcp_fin_timeout = 1
net.ipv4.tcp_tw_recycle = 1
# TCP memory
net.core.rmem_max = 16777216
net.core.rmem_default = 16777216
net.core.netdev_max_backlog = 262144
net.core.somaxconn = 262144
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_max_orphans = 262144
net.ipv4.tcp_max_syn_backlog = 262144
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
# For Large File Hosting Servers
net.core.wmem_max = 1048576
net.ipv4.tcp_wmem = 4096 87380 524288
</pre>
<p>in the apache virtual host we just use proxy pass to forward our static urls to the lighttpd server running on port 8080</p>
<pre class="brush: css;">
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /images http://127.0.0.1:8080/images
ProxyPass /js http://127.0.0.1:8080/js
ProxyPass /css http://127.0.0.1:8080/css
ProxyPassReverse / http://127.0.0.1:8080/
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.webzappr.com/2008/10/lighttpd-for-image-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
