Welcome! Log In Create A New Profile

Advanced

nginx geoip module with reverse proxy in multi tenant

March 26, 2021 11:47PM
Hi Team,

This is nginx 1.19.5
I have reverse proxy server where I am hosting around 20 sites behind nginx reverse proxy server. This reverse proxy server only used for reverse proxy purpose and no local web server is running on it.

I need to implement geoip blocking but what I understood from the document is
map $geoip_country_code $allowed_country variable to has to be set in http section and then
if ($allowed_country = no) {
return 444;
}

Can be called in server section. This is fine if I am hosting one site what if in case of mutiple sites? In this case suppose

siteA.exampe.com need to have access blocked from CN
While siteB.example.com needs to have access allowed from CN

How do I achieve it?
Subject Author Posted

nginx geoip module with reverse proxy in multi tenant

blason March 26, 2021 11:47PM

Re: nginx geoip module with reverse proxy in multi tenant

Francis Daly March 27, 2021 05:56AM

Re: nginx geoip module with reverse proxy in multi tenant

blason March 27, 2021 06:34AM

Re: nginx geoip module with reverse proxy in multi tenant

Sergey A. Osokin March 27, 2021 09:20PM

Re: nginx geoip module with reverse proxy in multi tenant

blason March 27, 2021 11:51PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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