Questions tagged [geoip]
84 questions
1
vote
1 answer
Nginx proxy_set_header not working to Apache GEOIP
I'm using Nginx reverse proxy to apache2 using following tutorial.
Then i try to install geoip to Nginx using this tutorial
The reverse proxy works flawlessly for a while now, until I tried to install the geoip database so I can get the country code…

Someone Special
- 183
- 2
- 9
1
vote
2 answers
How to use Env in mod_substitute?
Okay, I'm not very strong at htaccess. I have a code:
SetEnvIf GEOIP_COUNTRY_CODE US LinkC example1
AddOutputFilterByType SUBSTITUTE text/html
Substitute s/example2/env=LinkC/ni
I'm trying to substitue concrete content in my page. And all text were…

cooher
- 21
- 1
1
vote
3 answers
nginx GEOIP behind cloudflare proxy showing wrong country (not of end user, but if proxy)
I am using Cloudflare and nginx geoip directives:
geoip_country /usr/local/share/GeoIP/GeoIP.dat;
geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
They are picking the IP up OK (as pipaddress since the request is marked as forwarded in the…

morleyc
- 1,150
- 13
- 47
- 89
1
vote
0 answers
NginX with GeoIP - what is returned for geo code when no mapping is found?
As the tests I conducted (using Java API to read GeoIP.dat, as well as local test) might be insufficient, I was wondering what happens on NginX when geo-ip module is configured, and when no IP to Country mapping is found..?
Example results using…

Less
- 121
- 1
- 5
1
vote
1 answer
nginx geoip redirect for first time only leads to redirect loop
I'm trying to configure nginx to perform geoIP checks on first-time visitors only.
The idea is that first-time visitors should be redirected to the page version which has been customised for their language/country.
I'm able to check whether or not a…

cortopy
- 363
- 5
- 10
1
vote
3 answers
Arvixe claims that my physical host is located in Europe eventhough the whois information
When I look whois of the site it seems like located in US.
My site is: www.evdore.com.
1 * * *
2 hos-tr1.juniper1.rz13.hetzner.de 213.239.224.1 de 0.145 ms
hos-tr4.juniper2.rz13.hetzner.de 213.239.224.97 de 0.277 ms …

Ertugrul
- 13
- 3
1
vote
1 answer
Unable to configure MaxMindDB's Apache module
I recently installed MaxMind's MaxMindDB apache module successfully.
I added a new file called geoip.conf to /etc/httpd/conf.d/ with the following contents:
MaxMindDBEnable On
MaxMindDBFile COUNTRY_DB…

mittelmania
- 209
- 2
- 10
1
vote
1 answer
Nginx Location Rewrite Rule matching GeoIP Header value
I'm looking to write a simple rewrite rule where I basically am trying to say the following
If the requested URI is text/index.html (or test/) and the GeoIP Organization equals "My GeoIP Value" then server test/index2.html
I've tried a few…

steve mapes
- 11
- 2
1
vote
2 answers
One hostname and two servers in different countries
I have a site, let it be www.site.com/ (ASP NET MVC, but that's doesn't really matter) I have another site, let it be www.secondsite.vi/ (it hosts in Vietnam). The structure of the sites is the same, the data in databases differs.
I want to do…

Oleg Chibikov
- 11
- 1
- 2
1
vote
1 answer
Geographical data per ip command line tool
Is there any (preferably FOSS) command line tool that provides geographical information per requested IP?
Online example

pl1nk
- 461
- 5
- 22
1
vote
1 answer
Dynamic IP on NGINX geo module without restart
I want create a task on my Capistrano deploy to put my public IP on geo module configuration of my NGINX server without restart NGINX, is it possible?
Example, my /etc/nginx/nginx.conf:
geo $geo {
default no;
include…

joaorvmaia
- 11
- 3
1
vote
1 answer
GeoIP and Nginx
I have a nginx with geoip, but it is not working rightly. The issue is the next:
Nginx are getting geodata from $_SERVER['REMOTE_ADDR'] instead of $_SERVER['HTTP_X_HAPROXY_IP'], which have the real client ip. So, the reported geodata belongs to my…

blacksoul
- 252
- 7
- 22
1
vote
2 answers
IP addresses for Windows Azure servers seem to be from the US, when the servers are supposed to be located in Europe
I have a couple of test servers on Windows Azure. One is in the North Europe location and the other is in West Europe. I yet to get around to testing which location offers better connection speeds from where I am (London, UK).
The Northern Europe…

paradroid
- 868
- 5
- 15
- 29
1
vote
2 answers
varnish3, mod_geoip with apache2 using mod_rewrite and mod_rpaf
I am maintaining a website with 3 different versions of the site, with 3 different languages, handles with a single system written in php, which takes in environment variables based on the domain name that is being accessed.
These are the three…

mercy
- 131
- 5
1
vote
0 answers
Debian 11 - Crowdsec - geoip-enrich ignored
I installed crowdsec on a Debian 11 (and 12) machine and it works but the geoip localization.
If I do:
# cscli collections list
INFO[19-09-2021 10:16:20 AM] Ignoring file /etc/crowdsec/parsers/s02-enrich/geoip-enrich.yaml of type parsers
…

Matteo
- 41
- 5