Reference: PHP5 FastCGI config for nginx on Ubuntu and clean URLs

Submitted by jeff on Tue, 04/21/2009 - 15:25.

I was trying to figure out how to get a wordpress blog up and running on my slicehost slice real fast but I don’t know anything about nginx or FastCGI.

Serving PHP5 with Nginx on Ubuntu 7.10 turned out to be a good step-by-step that provided all the info I needed. Thanks Mr. Blogger!

For SEO purposes I also needed some clean URLs. nginx does not do .htaccess files so you have to setup the nginx config yourself. nginx rewrite rules for wordpress worked for me. Thank you too Mr. Blogger!

I added this to my location block {}.

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