<?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>Glen Lumanau &#187; fair proxy module</title>
	<atom:link href="http://lumanau.web.id/tag/fair-proxy-module/feed" rel="self" type="application/rss+xml" />
	<link>http://lumanau.web.id</link>
	<description>Nothing Special</description>
	<lastBuildDate>Fri, 30 Sep 2011 09:33:05 +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>Building a nginx package with fair proxy module on Debian/Ubuntu</title>
		<link>http://lumanau.web.id/2008/10/17/building-a-nginx-package-with-fair-proxy-module-on-debianubuntu.html</link>
		<comments>http://lumanau.web.id/2008/10/17/building-a-nginx-package-with-fair-proxy-module-on-debianubuntu.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 09:09:07 +0000</pubDate>
		<dc:creator>Glen Lumanau</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[fair proxy module]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://www.lumanau.web.id/?p=59</guid>
		<description><![CDATA[This&#8217;s how to recompile nginx with fair proxy module We need to recompile nginx to support fair proxy module. Because debian based nginx, doesn&#8217;t have this module loaded. And we need to download the module from here First of all, we need to install the software that&#8217;s needed to recompile a .deb packages apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>This&#8217;s how to recompile nginx with fair proxy module</p>
<p>We need to recompile nginx to support fair proxy module. Because debian based nginx, doesn&#8217;t have this module loaded. And we need to download the module from <a href="http://github.com/gnosek/nginx-upstream-fair/tree/master">here</a></p>
<p>First of all, we need to install the software that&#8217;s needed to recompile a .deb packages</p>
<blockquote><p><em>apt-get install build-essential debhelper fakeroot</em></p></blockquote>
<p><span id="more-59"></span></p>
<p>Then go to /usr/src directory</p>
<blockquote><p><em>cd /usr/src</em></p></blockquote>
<p>Now we need to download the source package of nginx</p>
<blockquote><p><em>apt-get source nginx</em></p>
<p><em>apt-get build-dep nginx</em></p></blockquote>
<p>$ mkdir /path/to/ngx_http_upstream_fair_module<br />
$ cd /path/to/ngx_http_upstream_fair_module<br />
$ curl -o ngx_http_upstream_fair_module.c  http://github.com/gnosek/nginx-upstream-fair/tree/master%2Fngx_http_upstream_fair_module.c?raw=true<br />
$ curl -o config  http://github.com/gnosek/nginx-upstream-fair/tree/master%2Fconfig?raw=true</p>
<p>Then we go to nginx directory</p>
<blockquote><p><em>cd /usr/src/nginx-0.6.32/debian</em></p></blockquote>
<p>Edit rules to add fair proxy module</p>
<blockquote><p><em>vim rules</em></p></blockquote>
<p>Add <em>&#8211;add-module=/path/to/ngx_http_upstream_fair_module</em></p>
<p>Go back to nginx directory</p>
<blockquote><p><em>cd ..</em></p></blockquote>
<p>Now it&#8217;s time for us to compile nginx and take a glass of coffee while waiting</p>
<blockquote><p><em>dpkg-buildpackage -rfakeroot</em></p></blockquote>
<p>If you found error like</p>
<blockquote><p><em>(WARNING: Failed to sign .dsc and .changes file)</em></p></blockquote>
<p>That means normal. Just ignore the error msg</p>
<p>Now go back to /usr/src directory</p>
<blockquote><p><em>cd /usr/src</em></p></blockquote>
<p>You should see a file called <strong><em>nginx_0.6.32-3_i386.deb</em></strong></p>
<p>Then install our new compiled nginx package</p>
<blockquote><p><em>dpkg -i </em><em>nginx_0.6.32-3_i386.deb</em></p></blockquote>
<p>Then lastly we add &#8220;fair&#8221; module on our nginx.conf</p>
<p>Example</p>
<blockquote><p><em>upstream backend {<br />
server server1;<br />
server server2;<br />
fair;<br />
}</em></p></blockquote>
<p>Congratulations that you have install nginx with fair proxy module on your debian <img src='http://lumanau.web.id/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://lumanau.web.id/2008/10/17/building-a-nginx-package-with-fair-proxy-module-on-debianubuntu.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

