<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: WordPress, Nginx and WP Super Cache</title>
	<atom:link href="http://ocaoimh.ie/wordpress-nginx-wp-super-cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/</link>
	<description>Look what I found today!</description>
	<lastBuildDate>Thu, 18 Mar 2010 11:41:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nginx + PHP-FPM, long recipe for a tuneup &#171; What&#39;s up with Hatim</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-673483</link>
		<dc:creator>Nginx + PHP-FPM, long recipe for a tuneup &#171; What&#39;s up with Hatim</dc:creator>
		<pubDate>Sun, 14 Mar 2010 17:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-673483</guid>
		<description>[...] complete. In order to handle redirects as 301 and not as 302 I used this plugin, and this post was extremely helpful in getting the permalinks working [...]</description>
		<content:encoded><![CDATA[<p>[...] complete. In order to handle redirects as 301 and not as 302 I used this plugin, and this post was extremely helpful in getting the permalinks working [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hatim</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-673465</link>
		<dc:creator>hatim</dc:creator>
		<pubDate>Sun, 14 Mar 2010 01:59:15 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-673465</guid>
		<description>Hey, thanks, your tip worked for me and saved me from making a bad decesion (ie paying to move to Blogger :)</description>
		<content:encoded><![CDATA[<p>Hey, thanks, your tip worked for me and saved me from making a bad decesion (ie paying to move to Blogger <img src='http://ocaoimh.ie/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allen</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-672136</link>
		<dc:creator>Allen</dc:creator>
		<pubDate>Thu, 28 Jan 2010 16:09:31 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-672136</guid>
		<description>This works for my blog, thanks for your post.</description>
		<content:encoded><![CDATA[<p>This works for my blog, thanks for your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ttech</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-671495</link>
		<dc:creator>Ttech</dc:creator>
		<pubDate>Fri, 08 Jan 2010 01:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-671495</guid>
		<description>I recently switched, almost everything works except for Wordpress&#039;s automatic upgrade core which sadly does not automatically do anything as of now.
Otherwise ram load drastically cut back and makes the switch worth it.</description>
		<content:encoded><![CDATA[<p>I recently switched, almost everything works except for Wordpress&#8217;s automatic upgrade core which sadly does not automatically do anything as of now.<br />
Otherwise ram load drastically cut back and makes the switch worth it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kyrra</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-671183</link>
		<dc:creator>Kyrra</dc:creator>
		<pubDate>Fri, 25 Dec 2009 09:01:55 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-671183</guid>
		<description>I use nginx + apache (mod_php).  I did some testing, comparing apache vs FastCGI, where both only handle PHP scripts.  The processing speed and rate at which the data was returned was almost identical.  FastCGI was just a sliver faster, but I accounted that to some .htaccess rules I still had in place that Apache had to deal with.

Nginx on the front end is AMAZING when it comes to handing static content.  Then let Apache or FastCGI do the heavy lifting of PHP and your website can handle much higher loads than normal.</description>
		<content:encoded><![CDATA[<p>I use nginx + apache (mod_php).  I did some testing, comparing apache vs FastCGI, where both only handle PHP scripts.  The processing speed and rate at which the data was returned was almost identical.  FastCGI was just a sliver faster, but I accounted that to some .htaccess rules I still had in place that Apache had to deal with.</p>
<p>Nginx on the front end is AMAZING when it comes to handing static content.  Then let Apache or FastCGI do the heavy lifting of PHP and your website can handle much higher loads than normal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Myatu</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-671011</link>
		<dc:creator>Myatu</dc:creator>
		<pubDate>Fri, 18 Dec 2009 01:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-671011</guid>
		<description>Figures! I came up with my own solution just this week and you&#039;ve already done it :)

Anyway, what I had come up with isn&#039;t too far from what you&#039;ve already done, except that I use Apache for the back-end and I have added support for mobile phones. 

The mobile phone support was important to me, since I am using a different themes for those, which aren&#039;t cached. I would post it here if it wasn&#039;t such a long line (I&#039;m checking for more mobile browsers than WP Super Cache does), so have a look at:

http://www.myatus.co.uk/2009/12/17/faster-wp-super-cache-with-nginx/

Just take that code that checks the user-agent, place it among the other &quot;if .. set $supercache_uri&quot; lines as shown here, and instead of &#039;set $mobile &quot;M&quot;;&#039; you use &quot;set $supercache_uri &#039;&#039;;&quot;. Don&#039;t forget to disable it in WP Super Cache itself :)</description>
		<content:encoded><![CDATA[<p>Figures! I came up with my own solution just this week and you&#8217;ve already done it <img src='http://ocaoimh.ie/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, what I had come up with isn&#8217;t too far from what you&#8217;ve already done, except that I use Apache for the back-end and I have added support for mobile phones. </p>
<p>The mobile phone support was important to me, since I am using a different themes for those, which aren&#8217;t cached. I would post it here if it wasn&#8217;t such a long line (I&#8217;m checking for more mobile browsers than WP Super Cache does), so have a look at:</p>
<p><a href="http://www.myatus.co.uk/2009/12/17/faster-wp-super-cache-with-nginx/" rel="nofollow">http://www.myatus.co.uk/2009/12/17/faster-wp-super-cache-with-nginx/</a></p>
<p>Just take that code that checks the user-agent, place it among the other &#8220;if .. set $supercache_uri&#8221; lines as shown here, and instead of &#8217;set $mobile &#8220;M&#8221;;&#8217; you use &#8220;set $supercache_uri &#8221;;&#8221;. Don&#8217;t forget to disable it in WP Super Cache itself <img src='http://ocaoimh.ie/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donncha</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-670712</link>
		<dc:creator>Donncha</dc:creator>
		<pubDate>Sun, 06 Dec 2009 18:36:35 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-670712</guid>
		<description>The Nginx experiment is over. It didn&#039;t reduce the load on my server, it did quite the opposite in fact which might have been a result of using php5-cgi. The load went up after I changed to Nginx, and when I installed P2 it made things worse because of the p2ajax requests looking for updates. Supercache can&#039;t cache those requests so PHP was being executed for each of those requests, and there were a &lt;em&gt;lot&lt;/em&gt; of them. People leave their browsers open all day!</description>
		<content:encoded><![CDATA[<p>The Nginx experiment is over. It didn&#8217;t reduce the load on my server, it did quite the opposite in fact which might have been a result of using php5-cgi. The load went up after I changed to Nginx, and when I installed P2 it made things worse because of the p2ajax requests looking for updates. Supercache can&#8217;t cache those requests so PHP was being executed for each of those requests, and there were a <em>lot</em> of them. People leave their browsers open all day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shura Luberetsky</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-670478</link>
		<dc:creator>Shura Luberetsky</dc:creator>
		<pubDate>Sat, 28 Nov 2009 16:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-670478</guid>
		<description>As in my installation of Wordpress (on a Russian hosting server dobrohost.ru, where nginx is enabled by default), there appear some problems with wp-cron and nginx. In versions prior to 2.7, the tasks were spawned with this code:

function spawn_cron() {

//skipped some code

if ( $argyle )
fputs( $argyle,
&quot;GET {$parts[&#039;path&#039;]}?check=&quot; . wp_hash(&#039;187425&#039;) . &quot; HTTP/1.0\r\n&quot;
. &quot;Host: {$_SERVER[&#039;HTTP_HOST&#039;]}\r\n\r\n&quot;
);

}


The socket was closed immediately, and nginx, working as a frontend for Apache, considered this as an error (#499 - the socket was closed prior to reply of webserver), the GET request was not relayed further and the task planner did not work. The problem can be resolved by adding a usleep(100000); delay (or a bit bigger, depending on the load of the server).

In further versions, wp-cron was rewrited and the tasks were spawned by this code: 

wp_remote_post($cron_url, array(&#039;timeout&#039; =&gt; 0.01, &#039;blocking&#039; =&gt; false));

A 0.01 second delay is often too small, so this should be changed to

wp_remote_post($cron_url, array(&#039;timeout&#039; =&gt; 0.1, &#039;blocking&#039; =&gt; false));

or something like this, for proper work of wp-cron and nginx.</description>
		<content:encoded><![CDATA[<p>As in my installation of Wordpress (on a Russian hosting server dobrohost.ru, where nginx is enabled by default), there appear some problems with wp-cron and nginx. In versions prior to 2.7, the tasks were spawned with this code:</p>
<p>function spawn_cron() {</p>
<p>//skipped some code</p>
<p>if ( $argyle )<br />
fputs( $argyle,<br />
&#8220;GET {$parts['path']}?check=&#8221; . wp_hash(&#8216;187425&#8242;) . &#8221; HTTP/1.0\r\n&#8221;<br />
. &#8220;Host: {$_SERVER['HTTP_HOST']}\r\n\r\n&#8221;<br />
);</p>
<p>}</p>
<p>The socket was closed immediately, and nginx, working as a frontend for Apache, considered this as an error (#499 &#8211; the socket was closed prior to reply of webserver), the GET request was not relayed further and the task planner did not work. The problem can be resolved by adding a usleep(100000); delay (or a bit bigger, depending on the load of the server).</p>
<p>In further versions, wp-cron was rewrited and the tasks were spawned by this code: </p>
<p>wp_remote_post($cron_url, array(&#8216;timeout&#8217; =&gt; 0.01, &#8216;blocking&#8217; =&gt; false));</p>
<p>A 0.01 second delay is often too small, so this should be changed to</p>
<p>wp_remote_post($cron_url, array(&#8216;timeout&#8217; =&gt; 0.1, &#8216;blocking&#8217; =&gt; false));</p>
<p>or something like this, for proper work of wp-cron and nginx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2009-11-27 &#171; Breyten&#8217;s Dev Blog</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-670439</link>
		<dc:creator>links for 2009-11-27 &#171; Breyten&#8217;s Dev Blog</dc:creator>
		<pubDate>Fri, 27 Nov 2009 11:03:42 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-670439</guid>
		<description>[...] Holy Shmoly! » WordPress, Nginx and WP Super Cache (tags: wordpress nginx) [...]</description>
		<content:encoded><![CDATA[<p>[...] Holy Shmoly! » WordPress, Nginx and WP Super Cache (tags: wordpress nginx) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Relay</title>
		<link>http://ocaoimh.ie/wordpress-nginx-wp-super-cache/comment-page-1/#comment-670364</link>
		<dc:creator>Relay</dc:creator>
		<pubDate>Wed, 25 Nov 2009 16:01:28 +0000</pubDate>
		<guid isPermaLink="false">http://ocaoimh.ie/?p=89495533#comment-670364</guid>
		<description>Thanks for the tip, by the way :D</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, by the way <img src='http://ocaoimh.ie/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
