<?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 Blog of Angelo &#187; Linux</title>
	<atom:link href="http://angelo.mandato.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://angelo.mandato.com</link>
	<description>where logic becomes print</description>
	<lastBuildDate>Mon, 31 Oct 2011 16:12:10 +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>Source for Lighttpd mod_redirect rewrite module to use status code 302</title>
		<link>http://angelo.mandato.com/2007/11/11/source-for-lighttpd-mod_redirect-rewrite-module-to-use-status-code-302/</link>
		<comments>http://angelo.mandato.com/2007/11/11/source-for-lighttpd-mod_redirect-rewrite-module-to-use-status-code-302/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 05:52:40 +0000</pubDate>
		<dc:creator>Angelo</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://www.compiledweekly.com/blog/2007/11/11/source-for-lighttpd-mod_redirect-rewrite-module-to-use-status-code-302/</guid>
		<description><![CDATA[Lighttpd web server, also known as Lighty, is an excellent web server and has potential to replace Apache completely.Â  I am slowly migrating web sites that use feature specific settings in Apache to use Lighty.Â  A few months ago I ran into a problem with Lighty&#8217;s ModRewrite alternative for rewriting URLs.Â  Lighty uses two separate [...]]]></description>
			<content:encoded><![CDATA[<p>Lighttpd web server, also known as Lighty, is an excellent web server and has potential to replace Apache completely.Â  I am slowly migrating web sites that use feature specific settings in Apache to use Lighty.Â  A few months ago I ran into a problem with Lighty&#8217;s ModRewrite alternative for rewriting URLs.Â  Lighty uses two separate modules to handle internal rewrites and Location: redirects.Â  It uses the common HTTP 301 Moved Permanently status code.Â  For most circumstances, this works well but in some cases the application may require that the redirect only be temporary and return the HTTP 302 Found status code.Â  Instead of modifying the mod_redirect.c source and changing the http_status code value from 302 to 301, I added new code to support a new url.redirect parameter url.redirect-found.</p>
<p>I&#8217;ve posted the source to the Lighttpd bug tracking system in hopes it will be added to a future version of Lighty.Â  <a href="http://trac.lighttpd.net/trac/ticket/1446" title="Ticket for adding redirect HTTP 302 support to Lighty" target="_blank">http://trac.lighttpd.net/trac/ticket/1446</a></p>
<p>This addition should help the Lighty web server to be capable of handling the appropriate HTTP status codes for all situations that may arise for the web site in question.</p>
]]></content:encoded>
			<wfw:commentRss>http://angelo.mandato.com/2007/11/11/source-for-lighttpd-mod_redirect-rewrite-module-to-use-status-code-302/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighty Web Server Fast with static pages</title>
		<link>http://angelo.mandato.com/2007/10/26/lighty-web-server-fast-with-static-pages/</link>
		<comments>http://angelo.mandato.com/2007/10/26/lighty-web-server-fast-with-static-pages/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 23:42:02 +0000</pubDate>
		<dc:creator>Angelo</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Applications]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.compiledweekly.com/blog/2007/10/26/lighty-web-server-fast-with-static-pages/</guid>
		<description><![CDATA[Three months ago I started looking at an alternative web server to serve URL redirects.Â  The need arose when I found that Apache web server would consume a lot of system memory when testing simulated spikes to the server.Â  Apache could handle between 1,200 to 1,700 requests a second.Â  Though the number of requests per [...]]]></description>
			<content:encoded><![CDATA[<p>Three months ago I started looking at an alternative web server to serve URL redirects.Â  The need arose when I found that Apache web server would consume a lot of system memory when testing simulated spikes to the server.Â  Apache could handle between 1,200 to 1,700 requests a second.Â  Though the number of requests per second was satisfactory, the memory usage when these simulated spikes was concerning.</p>
<p>I did some research and came across Lighttpd web server, also known as Lighty.Â  Lighty took some time to figure out, but once I did I found the XML style configuration files were not hard to implement and understand.Â  I did find the rewriting to be rather limited in comparison to the mod_rewrite module found in Apache.Â  Never the less, I was able to duplicate the rewrite that I had in Apache in Lighty.Â  For my application, I did have to modify the Lighty source code that way redirects returned a 302 HTTP response (It defaulted to 301 without any way of changing in the configuration files).</p>
<p>After performing similar tests with the same server configured with Lighty, I found that Lighty could handle between 3,900-4,100 requests per second.Â  On top of this, memory usage was minimized to only a fraction of the total memory available on the server.Â  Processor usage did increase, but was not substantial enough to warrant the change.</p>
<p>I am currently experimenting with combining Lighty with Apache services on one server in order to utilize the best of both worlds.Â  See my post on the lighttpd.net forums: <a href="http://forum.lighttpd.net/topic/13830" title="Lighty serve static files, Apache serves dynamic files" target="_blank">http://forum.lighttpd.net/topic/13830</a></p>
<p>Lighty may be able to also serve dynamic PHP files using FastCGI faster than Apache.Â  I am still concerned that PHP will not function correctly since it is not multi-threaded friendly.Â  I also have security concerns based on what I&#8217;ve seem with source code being exposed with a popular web site recently, I am not ready to take on that much risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://angelo.mandato.com/2007/10/26/lighty-web-server-fast-with-static-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Save bandwidth and faster downloads with Apache mod_deflate</title>
		<link>http://angelo.mandato.com/2007/07/02/save-bandwidth-and-faster-downloads-with-apache-mod_deflate/</link>
		<comments>http://angelo.mandato.com/2007/07/02/save-bandwidth-and-faster-downloads-with-apache-mod_deflate/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 14:59:45 +0000</pubDate>
		<dc:creator>Angelo</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.compiledweekly.com/blog/2007/07/02/save-bandwidth-faster-and-downloads-with-apache-mod_deflate/</guid>
		<description><![CDATA[I&#8217;ve been auditing apache web logs from statistics gathered in AWStats. I found 6 different IP addresses that are using a lot of the servers bandwidth. After looking at the logs, I discovered one of the IP addresses was a spammer and the rest are from web robots or bots. One bot used over 2.5GB [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been auditing apache web logs from statistics gathered in AWStats.  I found 6 different IP addresses that are using a lot of the servers bandwidth.  After looking at the logs, I discovered one of the IP addresses was a spammer and the rest are from web robots or bots.  One bot used over 2.5GB of traffic last month.  That is unbelievable.   That is 2.5% of the months bandwidth.  Of course Google and Yahoo combined have downloaded almost 30GB, but we want Google and Yahoo to index our sites.  So what can we do to save our bandwidth and still provide the information to the search engines?  Compress it with Mod_deflate!</p>
<p>The mod_deflate module in Apache is not new.  What is new is the trend to use it.  The deflate module uses gzip compression and is relatively fast in comparison to the bandwidth time.  You can do the math, but if your page was 1MB and took 20 seconds to download, and compressed it is 250k and takes 1 second to compress, 5 second to download, and 2 second to decompress, the compression method is faster.  You can crunch numbers till you are blue in the face, but the basic premise holds true.</p>
<p>First, you need to make sure the mod_deflate module is enabled in apache.  Look for the line in your apache configuration files and uncomment:</p>
<blockquote><p>LoadModule deflate_module modules/mod_deflate.so</p></blockquote>
<p>Then add the following lines within a &lt;Location&gt; or &lt;VirtualHost&gt; section.</p>
<blockquote><p> SetInputFilter DEFLATE</p></blockquote>
<p>The above will compress everything.  Instead of compressing everything, especially if you have a lot of files on your web site such as images, media, zip files, etc.. that are already compressed, you may want to only add compression for particular content types.  To compress specific content types, replace the SetInputFilter with one or more of the following.</p>
<blockquote><p>AddOutputFilterByType DEFLATE text/html<br />
AddOutputFilterByType DEFLATE text/plain<br />
AddOutputFilterByType DEFLATE text/xml<br />
AddOutputFilterByType DEFLATE text/css<br />
AddOutputFilterByType DEFLATE text/javascript<br />
AddOutputFilterByType DEFLATE application/x-javascript<br />
AddOutputFilterByType DEFLATE application/xml<br />
AddOutputFilterByType DEFLATE application/x-httpd-php</p></blockquote>
<p>If you work with other content types such as application/xml, you can add those as well.</p>
<p>You can test your server by using the GID Network gzip test located here: <a href="http://www.gidnetwork.com/tools/gzip-test.php" title="GID Network gzip test" target="_blank">http://www.gidnetwork.com/tools/gzip-test.php</a></p>
<p>Now that your web server is using compression, you can focus on other things like programming or eating pizza.</p>
]]></content:encoded>
			<wfw:commentRss>http://angelo.mandato.com/2007/07/02/save-bandwidth-and-faster-downloads-with-apache-mod_deflate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

