<?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>Nigel Dunn</title>
	<atom:link href="http://www.nigeldunn.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nigeldunn.com</link>
	<description>breaking the Internet for 15 years.</description>
	<lastBuildDate>Sun, 11 Dec 2011 00:07:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>libevent-2.0.so.5: cannot open shared object file: No such file or directory</title>
		<link>http://www.nigeldunn.com/2011/12/11/libevent-2-0-so-5-cannot-open-shared-object-file-no-such-file-or-directory/</link>
		<comments>http://www.nigeldunn.com/2011/12/11/libevent-2-0-so-5-cannot-open-shared-object-file-no-such-file-or-directory/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 00:06:13 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=130</guid>
		<description><![CDATA[When installing Memcached on a machine I came across the following error when I tried to start it: memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory The solution for this on &#8230; <a href="http://www.nigeldunn.com/2011/12/11/libevent-2-0-so-5-cannot-open-shared-object-file-no-such-file-or-directory/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When installing Memcached on a machine I came across the following error when I tried to start it:</p>
<pre>memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory</pre>
<p>The solution for this on Debian/Ubuntu (and probably most other linux distros) is this&#8230;</p>
<p>On a 32 bit system:</p>
<pre><code>ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5</code></pre>
<p>On a 64 bit system:</p>
<pre><code>ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib64/libevent-2.0.so.5</code></pre>
<p>After creating the appropriate symlink for your system you should now be able to start memcached as normal:</p>
<pre><code>memcached -d -u memcached_user -m 256 127.0.0.1 -p 11211</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/12/11/libevent-2-0-so-5-cannot-open-shared-object-file-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My last thoughts on Symfony2</title>
		<link>http://www.nigeldunn.com/2011/11/24/my-last-thoughts-on-symfony2/</link>
		<comments>http://www.nigeldunn.com/2011/11/24/my-last-thoughts-on-symfony2/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 22:48:55 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=121</guid>
		<description><![CDATA[Well I&#8217;ve been playing with Symfony2 for 3 months now and today is the day I&#8217;m officially turning my back on the Symfony project. I played around and built several small things just to see how it worked. I found &#8230; <a href="http://www.nigeldunn.com/2011/11/24/my-last-thoughts-on-symfony2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve been playing with Symfony2 for 3 months now and today is the day I&#8217;m officially turning my back on the Symfony project. I played around and built several small things just to see how it worked. I found it to have a brutal learning curve but maybe thats just me. Ultimately performance is what has driven my decision. I&#8217;ve heard the arguments &#8220;early optimization is one of the 7 deadly sins of programming&#8221; and &#8220;hardware is cheap&#8221;. All I have to say to both of those arguments is bollocks!</p>
<p>First off:</p>
<p>&#8220;early optimization is one of the 7 deadly sins of programming&#8221;<br />
Sure, I can understand that &#8211; write your app, then optimize it. But your underlying framework should be absolutely optimized. If you start with a slow base guess what the outcome is going to be&#8230; a slow website/application. From what I&#8217;ve read online, Symfony2 is probably a huge performance increase over Symfony however when you strip Symfony2 down to its core framework without Doctrine or anything else and simple do:</p>
<pre><code>
public function someAction()
{
    return new Response('Hello World');
}
</code></pre>
<p>I only got 950 requests per second, before adding on any baggage at all. I made a simple site, the homepage has 2 queries and thats it. 160 requests per second. Seriously? Someone posted on my other Symfony post that &#8220;you could pick another framework that is 20% faster&#8230;.&#8221;, so lets look at some other frameworks for a second:</p>
<p>Out of the box, (H)MVC &#8220;Hello World&#8221; tests:</p>
<p>DooPHP: 8800 requests per second<br />
FuelPHP (5.3 framework): 5000 requests per second<br />
Codeigniter 2: 4800 requests per second<br />
Kohana: 4000 requests per second<br />
Yii: 3900 requests per second<br />
Cake: 1300 requests per second</p>
<p>All tests were done on exactly the same server, running exactly the same software stack, and all taking network out of the equation. When you added network into the equation, my server was able to deliver about 700 requests per second of a full content index page of a website, still about 5 times more than the same page built in Symfony2 using 2 doctrine queries. The test machine is a 768MB of RAM, quad processor, virtual machine from Linode.</p>
<p>&#8220;Hardware is cheap&#8221;<br />
I&#8217;ve heard this argument plenty of times. Sure the hardware might be cheap but that doesnt factor in the cost of the people required to make your application run on a multi server configuration or the cost of building and configuring that hardware to work well. Building multi server deployments comes with a whole host of challenges and most people don&#8217;t have an app that can scale horizontally at the flip of a switch. Funny that all the worst performing platforms all say &#8220;hardware is cheap&#8221;. Magento is a great example of this philosophy. Quite possibly the best marketing scam ever, Magento is a joke when it comes to performance. But I digress&#8230;</p>
<p>Symfony2 is slow, very very slow. Regardless of caching, the core framework is more than 5 times slower than FuelPHP (another 5.3 framework). If that is the sacrifice you are willing to make then good on you. Supposing you wanted to service hundreds of thousands of requests per day. With a performance driven framework you could do it with a single dedicated box which for arguments sake costs you $200 per month. With Symfony you&#8217;d be looking at $1000 per month. Thats an awful lot of additional tshirts, coffee mugs, or iphone apps that you&#8217;d have to sell each month just to pay your hosting (let alone the more specialised staff for multi server setups).</p>
<p>TL:DR<br />
Symfony2, can I please a credit for the last 3 months of my life. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/11/24/my-last-thoughts-on-symfony2/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>My first thoughts on Symfony2</title>
		<link>http://www.nigeldunn.com/2011/10/20/my-first-thoughts-on-symfony2/</link>
		<comments>http://www.nigeldunn.com/2011/10/20/my-first-thoughts-on-symfony2/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 00:16:46 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=118</guid>
		<description><![CDATA[I&#8217;ve been playing with Symfony2 for a little while now and I think I&#8217;m starting to get on top of it. When I started looking at Symfony2 I&#8217;d never used an ORM or a templating language before as well as &#8230; <a href="http://www.nigeldunn.com/2011/10/20/my-first-thoughts-on-symfony2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing with Symfony2 for a little while now and I think I&#8217;m starting to get on top of it. When I started looking at Symfony2 I&#8217;d never used an ORM or a templating language before as well as not being versed in the features that PHP 5.3 introduced to the language. All in all it has been a very steep learning curve for me. If you are new to PHP frameworks or object oriented PHP then you can expect to feel thoroughly overwhelmed at first and it will take a lot of hours to produce something functional.</p>
<p>Having said all that &#8211; now that I&#8217;m starting to get my head around Symfony and I&#8217;ve made a few small basic apps, it really is quite a nice framework to code in. I really like the bundle system because it encourages you to make things in a reusable way. I can see in a few months that I will have my own bundle of bundles and that developing an app will be significantly faster as I&#8217;ll be able to drop in large amounts of functionality very very quickly.</p>
<p>I&#8217;m concerned about the performance of Symfony. It has the nick name &#8220;slowfony&#8221; for version 1 amongst performance oriented developers. I did some initial tests with caching completely disabled and the results were pretty bad. Even with APC I was only seeing 130 requests per second without hitting the database. I really need to spend more time understanding the caching aspects of Symfony so I can write a post on maximising performance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/10/20/my-first-thoughts-on-symfony2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to stop Joomla Media Manager making your image names lowercase!</title>
		<link>http://www.nigeldunn.com/2011/08/18/how-to-stop-joomla-media-manager-making-your-image-names-lowercase/</link>
		<comments>http://www.nigeldunn.com/2011/08/18/how-to-stop-joomla-media-manager-making-your-image-names-lowercase/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 01:13:02 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=115</guid>
		<description><![CDATA[I recently developed a simple module that loaded in images automatically based off a folder/file structure in the images folder. The name of the file would dictate the caption underneath the image requiring names of files to be descriptive and &#8230; <a href="http://www.nigeldunn.com/2011/08/18/how-to-stop-joomla-media-manager-making-your-image-names-lowercase/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently developed a simple module that loaded in images automatically based off a folder/file structure in the images folder. The name of the file would dictate the caption underneath the image requiring names of files to be descriptive and capitalized correctly. I didn&#8217;t realise at the time I built this module that Media Manager converts all filenames to lowercase by default. I did a quick Google and found several people asking how to switch this off but no answers.</p>
<p>I needed to switch this off so I did some quick searches of the admin folder and found the answer.</p>
<p>Open the file:<br />
/administrator/components/com_media/controllers/file.php</p>
<p>If you do a search in the file for &#8216;strtolower&#8217; you should find a line of code that looks like this:<br />
(line 58 in the version of Joomla 1.5 I was working on)</p>
<pre><code>$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.strtolower($file['name']));</code></pre>
<p>Simply change this line to look like this:</p>
<pre><code>$filepath = JPath::clean(COM_MEDIA_BASE.DS.$folder.DS.$file['name']);</code></pre>
<p>And thats all there is to it. Now you can have any capitalization at all in your filenames.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/08/18/how-to-stop-joomla-media-manager-making-your-image-names-lowercase/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP-FPM crashes using PHP 5.3.6 with Nginx</title>
		<link>http://www.nigeldunn.com/2011/08/10/php-fpm-crashes-using-php-5-3-6-with-nginx/</link>
		<comments>http://www.nigeldunn.com/2011/08/10/php-fpm-crashes-using-php-5-3-6-with-nginx/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 04:26:15 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=112</guid>
		<description><![CDATA[I recently spent a few hours smashing my head against my keyboard trying to figure out why PHP-FPM was dying every time I tried to load my favourite framework. The cause ended up being APC. Versions 3.1.9 and 3.1.8 don&#8217;t &#8230; <a href="http://www.nigeldunn.com/2011/08/10/php-fpm-crashes-using-php-5-3-6-with-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently spent a few hours smashing my head against my keyboard trying to figure out why PHP-FPM was dying every time I tried to load my favourite framework. The cause ended up being APC. Versions 3.1.9 and 3.1.8 don&#8217;t work properly with PHP 5.3.6 on Ubuntu 10.04 and Debian 6. I had to use APC 3.1.6 to get it to compile without errors.</p>
<p>Hope this saves someone an hour or two.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/08/10/php-fpm-crashes-using-php-5-3-6-with-nginx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rewriting subdomains to the Document Root in Nginx</title>
		<link>http://www.nigeldunn.com/2011/06/30/rewriting-subdomains-to-the-document-root-in-nginx/</link>
		<comments>http://www.nigeldunn.com/2011/06/30/rewriting-subdomains-to-the-document-root-in-nginx/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 05:59:36 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=105</guid>
		<description><![CDATA[I spent a little bit of time on this today getting my development environment working this morning on my new laptop. I wanted to be able to create a new folder inside a directory and not have to create a &#8230; <a href="http://www.nigeldunn.com/2011/06/30/rewriting-subdomains-to-the-document-root-in-nginx/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I spent a little bit of time on this today getting my development environment working this morning on my new laptop. I wanted to be able to create a new folder inside a directory and not have to create a Nginx config each time.</p>
<p>This is just a minimal conf and you can add in all the whistles and bells that you like. The part that had me stuck was setting the variable. The searches I originally did showed the config working without having to set a variable, just using $1 from the regex in the root value. Once I set the variable and replaced the variable in the root directive it all fell into place.</p>
<p>Hope this helps someone <img src='http://www.nigeldunn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>
server {

    server_name ~^(.+)\.example\.com$;

    set $file_path $1;

    root    /home/$file_path/public_html;
    index   index.html index.php;

    location / {
        try_files $uri /$uri /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        /usr/local/nginx/conf/fastcgi_params;
    }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/06/30/rewriting-subdomains-to-the-document-root-in-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iptables Rules to allow Git</title>
		<link>http://www.nigeldunn.com/2011/06/29/iptables-rules-to-allow-git/</link>
		<comments>http://www.nigeldunn.com/2011/06/29/iptables-rules-to-allow-git/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 03:39:52 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Web Hosting]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=102</guid>
		<description><![CDATA[I have a client that wanted to use Git on their VPS. My firewall was blocking it and I had to do a little research. Git uses port 9418 to communicate. You don&#8217;t want to open up the port externally &#8230; <a href="http://www.nigeldunn.com/2011/06/29/iptables-rules-to-allow-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a client that wanted to use Git on their VPS. My firewall was blocking it and I had to do a little research. Git uses port 9418 to communicate. You don&#8217;t want to open up the port externally so I used stateful inspection to open the port only if we established the connection.</p>
<p>Here are the iptables rules:</p>
<p># allow git<br />
iptables -A OUTPUT -o eth0 -p tcp &#8211;dport 9418 -m state &#8211;state NEW,ESTABLISHED -j ACCEPT<br />
iptables -A INPUT -i eth0 -p tcp &#8211;sport 9418 -m state &#8211;state ESTABLISHED -j ACCEPT</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/06/29/iptables-rules-to-allow-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04 libjpeg.so libpng.so PHP installation issues</title>
		<link>http://www.nigeldunn.com/2011/05/14/ubuntu-11-04-libjpeg-so-libpng-so-php-installation-issues/</link>
		<comments>http://www.nigeldunn.com/2011/05/14/ubuntu-11-04-libjpeg-so-libpng-so-php-installation-issues/#comments</comments>
		<pubDate>Sat, 14 May 2011 06:38:41 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=98</guid>
		<description><![CDATA[I purchased a new laptop today. After about a week of research and looking at various options I decided on an HP DV6-6026TX. So for the laptop has been an absolute joy to work with. The first thing I did &#8230; <a href="http://www.nigeldunn.com/2011/05/14/ubuntu-11-04-libjpeg-so-libpng-so-php-installation-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I purchased a new laptop today. After about a week of research and looking at various options I decided on an HP DV6-6026TX. So for the laptop has been an absolute joy to work with. The first thing I did was blow away Windows completely and install Ubuntu 11.04. The first thing I discovered was that if you install the genuine ATI graphics drivers, Unity dies. Ubuntu installed straight away and everything I&#8217;ve tested (which isnt that much) seems to be working fine.</p>
<p>So, first thing to do is get the machine all setup as a development platform for my study/work. I installed Nginx and then started getting PHP ready to install. Once I was all ready to go I started the ./configure script for PHP. The configuration script fails with warnings about libjpeg.so. I immediately changed my ./configure to have:</p>
<p><code>--with-jpeg-dir=/usr/lib/x86_64-linux-gnu</code></p>
<p>Unfortunately this failed as well which did surprise me. My solution to the problem was to create symlinks for both libjpeg.so and libpng.so to the /usr/lib directory and to only have <code>--with-jpeg-dir</code> in my configure script.</p>
<p>In summary, here are the 2 simlinks that were required when building PHP on Ubuntu 11.04 64bit:<br />
<code><br />
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib/libjpeg.so<br />
ln -s /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/libpng.so<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/05/14/ubuntu-11-04-libjpeg-so-libpng-so-php-installation-issues/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unable to allocate memory pool.</title>
		<link>http://www.nigeldunn.com/2011/05/02/unable-to-allocate-memory-pool/</link>
		<comments>http://www.nigeldunn.com/2011/05/02/unable-to-allocate-memory-pool/#comments</comments>
		<pubDate>Mon, 02 May 2011 07:00:40 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=88</guid>
		<description><![CDATA[When you wake up in the morning, log into your web server and glimpse at your php error logs it can be a little unsettling to see every page request producing &#8216;Unable to allocate memory pool&#8217; error messages. After doing &#8230; <a href="http://www.nigeldunn.com/2011/05/02/unable-to-allocate-memory-pool/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you wake up in the morning, log into your web server and glimpse at your php error logs it can be a little unsettling to see every page request producing &#8216;Unable to allocate memory pool&#8217; error messages. After doing some googling and reading the APC bug list I found <a href="http://pecl.php.net/bugs/bug.php?id=16966" onclick="pageTracker._trackPageview('/outgoing/pecl.php.net/bugs/bug.php?id=16966&amp;referer=');">lots of people</a> are experiencing this problem. I was experiencing this issue myself and needed a solution fast. I scrolled down through the comments and discovered that the general consensus was to set:</p>
<pre>
apc.mmap_file_mask = /dev/zero
</pre>
<p>I decided to continue reading up on APC having made this change however a few days later MySQL randomly died. A few days later the same thing happened again. At this point I decided to revisit how I had my memory settings configured on my server. I dropped my kernel.shmmax down to about 25% of my VPS&#8217;s total amount of RAM. One thing I hadn&#8217;t used or paid much attention to is apc.php which comes with APC. I copied this to somewhere that I could browse to on my web server and looked at the stats of my cache. It became immediately apparent what was occurring &#8211; my cache was becoming so fragmented and full of stale data that there was nowhere that the cache could use.</p>
<p>That&#8217;s when I decided to read about the various TTL settings for APC.</p>
<p><code><br />
The number of seconds a cache entry is allowed to idle in a slot in case this cache entry slot is needed by another entry. Leaving this at zero means that APC's cache could potentially fill up with stale entries while newer entries won't be cached. In the event of a cache running out of available memory, the cache will be completely expunged if ttl is equal to 0. Otherwise, if the ttl is greater than 0, APC will attempt to remove expired entries.<br />
</code></p>
<p>I then looked at Rasmus&#8217;s example of php.net and looked at his APC settings. I noticed he had apc.ttl = 0 and that apc.user_ttl = 600 and apc.gc_ttl = 600. I made those changes to my own configuration and haven&#8217;t had an issue since. The site is significantly faster than it was with apc.ttl set to a fixed amount and I&#8217;d rather the cache flushed itself and started rebuilding itself rather than have the cost of defragmenting the cache each page request. I&#8217;m no authority on the matter but I know what worked for me.</p>
<p>I&#8217;ve since changed my apc.mmap_file_mask back to:</p>
<pre>
apc.mmap_file_mask = /tmp/apc.XXXXXX
</pre>
<p>and am monitoring how my server runs. If I have any updates I&#8217;ll let you all know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/05/02/unable-to-allocate-memory-pool/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nginx 1.0.0 is out!</title>
		<link>http://www.nigeldunn.com/2011/04/29/nginx-1-0-0-is-out/</link>
		<comments>http://www.nigeldunn.com/2011/04/29/nginx-1-0-0-is-out/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 08:51:04 +0000</pubDate>
		<dc:creator>nigel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nigeldunn.com/?p=82</guid>
		<description><![CDATA[I just happened to check the Nginx website today and discovered that version 1.0.0 stable has been released! I immediately downloaded it and updated my web server. So far so good, I&#8217;m currently rebuilding my Nginx conf files for my &#8230; <a href="http://www.nigeldunn.com/2011/04/29/nginx-1-0-0-is-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just happened to check the Nginx website today and discovered that version 1.0.0 stable has been released! I immediately downloaded it and updated my web server. So far so good, I&#8217;m currently rebuilding my Nginx conf files for my various sites. I learned a decent amount about Nginx configs this week and thought I&#8217;d take some time to show how my configs work. The config below is very basic and I just threw it together quickly </p>
<pre>
server {
    server_name	*.nigeldunn.com nigeldunn.com;
    rewrite ^ $scheme://www.nigeldunn.com$request_uri permanent;
}

server {

    server_name  www.nigeldunn.com;

    charset utf-8;

    root	/home/nigeldunn.com/public_html;
    index	index.php;

    error_log /path-to-logs/nginx.error.nigeldunn.com.log;

    keepalive_timeout    70;

    location / {
            try_files $uri $uri/ @rewrite;
    }

    location ~ /wp-content/(.*)\.php$ {
        deny all;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    location ~ (/index|wp-(.*)|/wp-admin/(.*))\.php$ {
	access_log /path-to-logs/nginx.access.nigeldunn.com.log;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        /usr/local/nginx/conf/fastcgi_params;
    }

    location @rewrite {
	 rewrite ^/(.*)$ /index.php?q=$request_uri;
    }

    location ~ \.php$ {
	deny all;
    }
}
</pre>
<p>I save these conf files in their own folder and load them into Nginx by adding the following to my /usr/local/nginx/conf/nginx.conf inside the http{} section.</p>
<pre>
        include /path-to-confs/*.conf;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nigeldunn.com/2011/04/29/nginx-1-0-0-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

