March 09, 2015 07:38PM
Is it possible to undo a server level deny all; inside a more specific location block? See the following:

server {
allow 1.2.3.4;
allow 2.3.4.5;
deny all;

location / {
location ~ ^/api/(?<url>.*) {
# bunch of directives
}

location = /actions/foo.php {
# bunch of directives
}

location = /actions/bar.php {
#bunch of directives
}

location = /actions/allow-all.php {
# this should allow all
# bunch of directives
}

location ~\.php {
# bunch of directives
}
}
}

All the location blocks except for /actions/allow-all.php should follow the global server allow and deny rules. /actions/allow-all.php should undo those rules and just allow all.
Subject Author Posted

How to "undo" a global server deny all in a location block

justink101 March 09, 2015 07:38PM

Re: How to "undo" a global server deny all in a location block

Francis Daly March 09, 2015 08:08PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 267
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready