Yay I fixed it: location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass 127.0.0.1:9000; fastcgi_intercept_errors on; error_page 404 /error/404.php; } Posted at Nginx Forum: http://forum.nginx.org/read.php?2,189193,190219#msg-190219