I have Nginx and PHP 5.3.5 running on my at Windows PC at work (I don't have administrator rights).
Serving static content works as expected, but when using FastCGI with PHP Nginx serves the PHP page as downloadable content, so I get a 'save as...' dialogue.
I have PHP-CGI.exe bound to localhost:9000, even when I don't have the PHP-CGI process running the same thing happens, so it appears that the request never leaves the Nginx process.
This happens with Nginx v0.8.54 and v0.9.5, my Nginx FastCGI configuration is as follows...
location ~ \.php$ {
root html;
fastcgi_pass localhost:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
include fastcgi_params;
}
Any ideas why this is happening? Is it a Windows Firewall issue? Any help would be greatly appreciated!
Your location block is fine. Check if your default_type isn't set to application/octet-stream.