<?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>Reliably Broken &#187; wordpress</title>
	<atom:link href="http://reliablybroken.com/b/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://reliablybroken.com/b</link>
	<description>It&#039;s a blog: let&#039;s do funch!</description>
	<lastBuildDate>Thu, 01 Dec 2011 21:27:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Nginx and WordPress</title>
		<link>http://reliablybroken.com/b/2010/05/nginx-and-wordpress/</link>
		<comments>http://reliablybroken.com/b/2010/05/nginx-and-wordpress/#comments</comments>
		<pubDate>Sat, 01 May 2010 08:18:08 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://reliablybroken.com/b/?p=441</guid>
		<description><![CDATA[My Nginx and WordPress configuration on Debian Linux 5 (Lenny). This has Nginx as the Web server using the fastcgi module to talk to php-cgi processes that run WordPress with pretty URLs. The virtual private server I installed this on (from John Companies) has a 256 megabyte slice, so I figured a regular Apache + [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://nginx.org/">Nginx</a> and <a href="http://wordpress.org/">WordPress</a> configuration on <a href="http://wiki.debian.org/DebianLenny">Debian Linux 5 (Lenny)</a>. This has Nginx as the Web server using the fastcgi module to talk to php-cgi processes that run WordPress with pretty URLs.</p>

<p>The virtual private server I installed this on (from <a href="http://www.johncompanies.com/">John Companies</a>) has a 256 megabyte slice, so I figured a regular Apache + mod_php setup might be in trouble seeing as one of the sites I am running gets several thousand visits a day. Up to now I have always used Apache with mod_php to run WordPress, and anyway it is fun to learn how unfamiliar software works (<a href="http://www.ibm.com/software/lotus/products/notes/">Lotus Notes</a> excepted).</p>

<p>On a side note, <a href="http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-guide/s1-boot-init-shutdown-sysv.html">SysV run-levels</a> and /etc/rcX.d directories are needlessly clever. <a href="http://sysv-rc-conf.sourceforge.net/">sysv-rc-conf</a> makes editing those easy.</p>

<pre><code>server {
    listen   80;
    server_name  example.com;

    root   /home/david/example.com;
    index  index.php index.html index.htm;
    error_page   500 502 503 504  /50x.html;

    location / {

    }

    location = /50x.html {
        root   /var/www/nginx-default;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    location ~ /\.ht {
        deny  all;
    }

    location /b/ {
        if (!-e $request_filename) {
            rewrite ^(.+)$ /b/index.php?q=$1 last;
        }
    }

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

# Rewrite www.example.com to example.com
server {
    listen 80;
    server_name www.example.com;
    rewrite ^ http://example.com$request_uri?;
}
</code></pre>

<p>This configuration is for WordPress installed under http://example.com/b/ on my server.</p>
]]></content:encoded>
			<wfw:commentRss>http://reliablybroken.com/b/2010/05/nginx-and-wordpress/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

