History: Nginx
Preview of version: 10
Nginx
http://www.stevestreeting.com/2012/05/09/apache-to-nginx-php-fpm-part-1/
http://www.stevestreeting.com/2012/05/24/apache-to-nginx-part-2/
PHP
NetBSD PHP
The original NetBSD 6.0 nginx.conf has got a line
Copy to clipboard
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
This leads to a File not found error page, and the line must be replaced with
Copy to clipboard
fastcgi_param SCRIPT_FILENAME $request_filename;
or
Copy to clipboard
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
to enable PHP.
Debian PHP
The same error as in NetBSD was observed as Debian 6.0 (Squeeze), the file is:
/etc/nginx/sites-available/default.
The problem is solved by using dotdeb:
http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu-debian
PHP General
Nginx SEO-friendly URLs
If feature sefurl is enabled (Preference name: feature_sefurl)
then nginx needs the following rewrite rule:
Copy to clipboard
try_files $uri $uri/ /route.php?q=$uri&$args;