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!