Stripping down the nginx.conf file:
server{
location / {
root /usr/share/nginx/html/mydomain/public_html;
if ($badagent) { return 403; }
}
location = /feeds {
try_files $uri $uri.xml $uri/ ;
}
}
The "=" should force an exact match, but the badagent map is checked.
___
You did not tell nginx where the geoip file is located.
https://nginx.org/docs/http/ngx_http_geoip_module.html#geoip_country
geoip_country /usr/share/GeoIP/GeoIP.dat;
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,282589,282593#msg-282593
_
Ugh. I clicked too quickly. Sorry. When I test this setup, I get a forbidden
in the US and a programmer in Jamaica gets the same thing. Can't figure out
why.
Posted at Nginx Forum:
https://forum.nginx.org/read.php?2,282589,282591#msg-282591
___
nginx m
Hi All
I would really appreciate some help here. I want to restrict all countries
except the US and Jamaica (JM).
load_module "/usr/local/libexec/nginx/ngx_http_geoip_module.so";
These are my entries in nginx.conf
Under http
map $geoip_country_code $country_access {
"US" 0;
On Tue, Jan 08, 2019 at 01:47:39PM +0300, ender ulusoy wrote:
Hi there,
> An example URL is here:
>
> https://www.example.com/campains/a4/search?page=1&criteria%5Badv_id%5D=2004
>
> I won't use cache on other pages. And I don't want to use an if condition
> because this page gets high traffic.
Hello everyone,
I have a website www.example.com. I just want to cache only pages includes
adv_id.
I'm using NGINX as a reverse proxy and 3 servers behind NGINX (Apache).
An example URL is here:
https://www.example.com/campains/a4/search?page=1&criteria%5Badv_id%5D=2004
I won't use cache on ot