Treat .htm files as PHP?

Michael Shadle mike503 at
Thu Jul 2 01:18:03 MSD 2009

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.

Sent from my iPhone

On Jul 1, 2009, at 2:01 PM, John Moore <grails at> wrote:

> I know how to do this with Apache, not so sure with nginx. One one of
> the websites I am hosting I want to use some PHP, but I don't want to
> rename the files from *.htm to *.php - I want the *.htm pages to be
> parsed as PHP (but for that site, or location, only). I should add  
> that
> I have PHP set up and working fine with nginx, so that is not an  
> issue.
> TIA,
> John

More information about the nginx mailing list