Treat .htm files as PHP?
mike503 at gmail.com
Thu Jul 2 21:23:16 MSD 2009
That's how I have mine setup. No need to hardcode the root in twice!
Sent from my iPhone
On Jul 2, 2009, at 3:05 AM, John Moore <grails at jmsd.co.uk> wrote:
> Phillip Oldham wrote:
>> John Moore wrote:
>>> Michael Shadle wrote:
>>>> Should be as simple as changing a php block and changing the
>>>> extension to htm and passing it on to fastcgi like normal. I think.
>>> Hmm, I'm not sure I quite understand what you mean here. Could you
>>> perhaps give me an example? When I did what I think you meant, I
>>> got an error page saying 'No input file specified'.
>> Follow this: http://wiki.nginx.org/NginxFcgiExample - and just
>> change the location block so it checks for .html instead of .php.
>> More details can be found here:
> Thanks. My problem was that while PHP was working generally, I
> couldn't get it to work for the specific domain. I realized that I
> was misinforming FastCGI about the location, with this line:
> fastcgi_param SCRIPT_FILENAME /var/www/nginx-default
> Changing it to this solved my problem:
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> Thanks for the help.
More information about the nginx