I've been following the Nginx + PHP-FPM + APC = awesome tutorial to setup nginx. The performance gains look well worth the battle so I thought I would try it on my laptop before moving to a production server.
So far everything has gone well, I can serve up static content and display a simple php file calling phpinfo();
However when I try installing drupal firefox the install.php file will download in the download manager (raw php code) instead of being displayed in the browser.
Is there anything that might cause nginx not to send files to php for processing?
No doubt I have to tweak my nginx.conf, but I don't have much knowledge on this. I've tried tweaking a few things but so far no luck. Any help would be greatly appreciated.
Here is my nginx.conf
server {
listen 80;
server_name localhost;
access_log /var/log/nginx_access.log main;
error_log /var/log/nginx_error.log debug;
root /var/www/default/pub;
index index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
error_page 404 index.php;
# hide protected files
#location ~* \.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|#tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)#$ {
# deny all;