On 7 Out 2010 17h07 WEST, nginx-forum@nginx.us wrote:
> Hello,
>
> I have this rule in apache that denies access to some extensions in
> multiple locations.
> I have this .htaccess in some folders like uploads, docs, pdfs.
>
>
> Order allow,deny
> Deny from all
>
>
> How can I join this in one line to deny access in multiple folders
> for these extensions?
>
> I was trying this without success:
>
> location ~ /(uploads/|docs/|pdfs/)*\.(php|cgi|pl|php3|php4|php5)$ {
> root /srv/www/portaldasviagens.com/public;
> deny all;
> }
Oops I forgot the $ in the regex :( Here it is.
location ~* ^.+\.(?:php[3-5]*|cgi|pl)$ {
return 404;
}
--- appa
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx