Welcome! Log In Create A New Profile

Advanced

Re: how to conditionally "if" match a network range?

Oleksandr V. Typlyns'kyi
June 17, 2010 03:42PM
Today Jun 17, 2010 at 12:17 Ben DJ wrote:

> i'd like to match, rather than on a single IP, to a network range. in effect,
>
> if ($remote_addr = 1.2.3.0/24) {
> ...
> }
>
> but, afaict, that doesn't work.

http://wiki.nginx.org/NginxHttpGeoModule

geo $mysubnet {
default 0;
1.2.3.0/24 1;
}
...
if ($mysubnet) {
...
}

--
WNGS-RIPE

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

how to conditionally "if" match a network range?

BenDJ June 17, 2010 03:22PM

Re: how to conditionally "if" match a network range?

Oleksandr V. Typlyns'kyi June 17, 2010 03:42PM

Re: how to conditionally "if" match a network range?

BenDJ June 17, 2010 03:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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