I’m trying to figure out why theres a desync between fastcgi and nginx
here.
The URL has .php in it, so it should be sent to fastcgi. But I get a 404
thrown.
Does anyone see anything wrong here?
I get the infamous “No input file specified.”
The only difference here is that i have “.php” and not “.php$” because
some scripts I have are index.php/foo/bar - but I have tried both in
this setup.
2008/05/26 14:47:05 [error] 14777#0: *16744547
“/home/mike/web/michaelshadle.com/category/respect/index.php” is not
found (2: No such file or directory), client: 71.12.2.124, server:
michaelshadle.com, request: “GET /category/respect/ HTTP/1.1”, host:
“michaelshadle.com”, referrer: “The Life and Times of Michael Shadle”
fails:
http://michaelshadle.com/category/respect/index.php
works:
http://michaelshadle.com/category/respect/
server {
listen 80;
server_name michaelshadle.com;
index index.php index.html;
root /home/mike/web/michaelshadle.com/;
include /etc/nginx/defaults.conf;
include /etc/nginx/expires.conf;
location ~ .php {
fastcgi_pass 127.0.0.1:11000;
fastcgi_index index.php;
}
error_page 404 = /wordpress/index.php?q=$uri;
}
and i do have this:
fastcgi_param REDIRECT_STATUS 200;
…
It does seem that if I do this instead:
if (!-e $request_filename) {
rewrite ^(.+)$ /wordpress/index.php?q=$1 last;
}
that it does hand off to fastcgi.
What needs to be done to have this work properly with Igor’s suggested
error_page version. Do I need to change WP to throw a header(“HTTP 404
not found”) or something?