Welcome! Log In Create A New Profile

Advanced

Blocking all URIs except for one directory

Igal @ Lucee.org
April 25, 2017 03:52PM
Hello,

I want to secure a site using the allow/deny directives so that only
allowed networks will be able to access it. There is one "public"
directory, however, that I want to be accessible for everyone.

nginx serves as a reverse proxy on that site, and requests for URIs that
end with the suffix ".cfm" are proxied to Tomcat.

So I currently have something like:

location / {
allow 10.0.0.0/24;
deny all;
}

location /public/ {
allow all; # does that make sense?
}

location ~ \.cfm$ {
## proxy settings go here
}

Keep in mind that .cfm scripts are both in /public/ as well as in other
directories.

How can I achieve that?

Thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Blocking all URIs except for one directory

Igal @ Lucee.org April 25, 2017 03:52PM

Re: Blocking all URIs except for one directory

Maxim Dounin April 26, 2017 08:52AM

Re: Blocking all URIs except for one directory

Igal @ Lucee.org April 27, 2017 11:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 223
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