Hi, I need to deny access to /members but allow access to every folders below. There may be a lot of folders, maybe a thousan, and each of those folders contain 5 other folders. So i need a wildcard. Here is what i tried : location ~ ^/members/([^/]+)/([^/?]+)$ { allow all; } #allow every folders below /members with wildcard location ~ ^/members/ { deny all; }by carlg - Nginx Mailing List - English
Here is what i found to achieve this : i denied access to every php files : location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; allow 127.0.0.1; deny all; } and then i create one rule per page (takes time with some scripts,by carlg - Nginx Mailing List - English
Hi, It works, but i am still able to access the php files inside the restricted directories. I tried with : location /myfolder/(.+)\.php$ { deny all; } But this doesn't work! Also, i cannot make this method work nice with our clean url's. We are using : location / { #try_files $uri $uri/ /index.php; #try_files $uri/ $uri /index.php?$query_string; includeby carlg - Nginx Mailing List - English
HI, I want to configure our nginx to be a little more paranoid concerning file access. Right now, i am using rules like : location /includes { allow 127.0.0.1; deny all; } ... but i need to repeat this kind of rules for every folders, and then restrict access to the php files inside. So our rules file is too long, complicated and getting very messy. Also, this doesn't protect the pby carlg - Nginx Mailing List - English