Welcome! Log In Create A New Profile

Advanced

Re: Treat .htm files as PHP?

July 02, 2009 01:23PM
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@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'.
>>>
>>> Thx.
>> 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:
>> http://wiki.nginx.org/NginxConfiguration
>> http://wiki.nginx.org/NginxHttpFcgiModule
>>
>>
>>
> 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
> $fastcgi_script_name;
>
> Changing it to this solved my problem:
>
> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
>
> Thanks for the help.
>
Subject Author Posted

Treat .htm files as PHP?

John Moore July 01, 2009 05:01PM

Re: Treat .htm files as PHP?

mike July 01, 2009 05:18PM

Re: Treat .htm files as PHP?

John Moore July 02, 2009 05:07AM

Re: Treat .htm files as PHP?

Phillip Oldham July 02, 2009 05:28AM

Re: Treat .htm files as PHP?

John Moore July 02, 2009 06:05AM

Re: Treat .htm files as PHP?

mike July 02, 2009 01:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 190
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready