After following the (http://wiki.nginx.org/Pitfalls) guide I am trying to cleanup my URL rewrites using the try_files directive. However, when using this on my install of Nginx 0.8.54-4 (from dotdeb) I get a prompt to download a BIN file when trying to access the site (which contains the source of the index.php PHP script). So are any of these directives not compatible with my version of nginx?
server {
listen 80;
server_name site.loc;
root /home/user/www/site.loc/docroot;
index index.html index.php;
location / {
try_files $uri $uri/ @runphp;
}
# Pass all .php files to PHP-FastCGI
location @runphp {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
}
}
Edited 1 time(s). Last edit at 10/13/2011 05:58PM by Xeoncross.