Re: Location recursive downloads php files

2013-07-21 Thread Francis Daly
On Sun, Jul 21, 2013 at 01:08:18PM -0400, Peleke wrote: Hi there, > Okay, it works if I add this: > > location ^~ /folder1/admin { > location ~ \.php$ { > } > } > location ~ \.php$ { > } > But that is redundancy and can be complicated if you have

Re: Location recursive downloads php files

2013-07-21 Thread Peleke
Okay, it works if I add this: location ^~ /folder1/admin { auth_basic "Login"; auth_basic_user_file /var/www/domain.tld/www/folder1/admin/.htpasswd; location ~ \.php$ { #limit_req zone=limit burst=5 nodelay; try_files $uri =404;

Re: Location recursive downloads php files

2013-07-21 Thread Francis Daly
On Sat, Jul 20, 2013 at 05:01:39PM -0400, Peleke wrote: Hi there, > I try to secure a specific folder and all files and subfolders with this > location block: > > location ^~ /folder1/admin { > auth_basic "Login"; > auth_basic_user_file > /var/www/domain.tld/www/folder1/adm

Location recursive downloads php files

2013-07-20 Thread Peleke
I try to secure a specific folder and all files and subfolders with this location block: location ^~ /folder1/admin { auth_basic "Login"; auth_basic_user_file /var/www/domain.tld/www/folder1/admin/.htpasswd; } With this code nginx offers always to download the php files.