Welcome! Log In Create A New Profile

Advanced

Specifying geoip country block list in location context

Posted by David999 
Specifying geoip country block list in location context
July 08, 2016 05:32PM
Hi,

Can I specify countries to be blocked in location context?

For example, I want one of my location definitions accessible from denmark but want to restrict other locations to Denmark & China or I want to grant access to a different country for each locations.

As far as I know, I can only set countries in http context and it inherits to all locations with ngx_http_geoip_module.

Best regards,

David
Re: Specifying geoip country block list in location context
July 08, 2016 05:38PM
If you can't set different blocks for different locations you can always create multiple maps and use them wherever you need .
Albeit its a bit moot to duplicate geo conditions but it would do what you want.

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: Specifying geoip country block list in location context
July 09, 2016 04:23AM
Haven't thought that multiple map supported.. It worked!

thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 342
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready