Welcome! Log In Create A New Profile

Advanced

Disable PHP in specific directories

June 10, 2010 11:59AM
I have nginx setup with PHP as FastCGI.

On my server, I have a couple of upload (writeable) directories and I want to disable nginx/php from serving php files in those directories (and all subdirectories).

I've tried creating some location rules in nginx, but I can't seem to get it working.

For example, if I have /public_html/uploads

Then I have /usr1, /usr2, /usr3, etc as subdirectories under /uploads...

I want to disable php in the uploads directory and all subdirectories. Or, if its possible to redirect anyone that tries to access a *.php file in those directories to a HTML error message file...either way.

Thanks!
Subject Author Posted

Disable PHP in specific directories

mindfrost82 June 10, 2010 11:59AM

Re: Disable PHP in specific directories

Boris Dolgov June 10, 2010 12:36PM

Re: Disable PHP in specific directories

Rob Schultz June 10, 2010 12:48PM

Re: Disable PHP in specific directories

Boris Dolgov June 10, 2010 01:32PM

Re: Disable PHP in specific directories

Rob Schultz June 10, 2010 01:42PM

Re: Disable PHP in specific directories

Igor Sysoev June 10, 2010 01:50PM

Re: Disable PHP in specific directories

Rob Schultz June 10, 2010 02:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready