I'm trying to block script execution in my user upload directories, will this work? If so, will it also cover all sub-directories in there as well?
location /media/data/vhosts/mysite.com/htdocs/forum/mydirectory/ {
location ~ .*\.(php|php5|cgi|phtml|php4)?$
{
deny all;
}
}
location /media/data/vhosts/mysite.com/htdocs/forum/mydirectory/ {
location ~ .*\.(php|php5|cgi|phtml|php4)?$
{
deny all;
}
}