leed25d / geoip-vmod Goto Github PK
View Code? Open in Web Editor NEWA GeoIp module for varnish
License: Other
A GeoIp module for varnish
License: Other
Hey there,
while running the make we get the following error:
make all-recursive
make[1]: Entering directory `/src/geoip-vmod'
Making all in src
make[2]: Entering directory `/src/geoip-vmod/src'
make[2]: *** No rule to make target `@VMODTOOL@', needed by `vcc_if.c'. Stop.
make[2]: Leaving directory `/src/geoip-vmod/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/src/geoip-vmod'
make: *** [all] Error 2
How to handle this?
Best regards
Is it possible? Does the vmod need new functionality for this (city lookup)?
Thank you!
Looking to use this and just want to know the future of this mod.
The README doesn't say that this mod is for varnish 3.
Hi!
I find this error when compiling:
[root@d148c4a87432 geoip-vmod]# make
make all-recursive
make[1]: Entering directory `/usr/local/src/geoip-vmod'
Making all in src
make[2]: Entering directory `/usr/local/src/geoip-vmod/src'
/usr/share/varnish/vmodtool.py ../src/vmod_geoip.vcc
ERROR: Format error reading "../src/vmod_geoip.vcc": 'Unknown keyword: $Init'
make[2]: *** [vcc_if.c] Error 254
make[2]: Leaving directory `/usr/local/src/geoip-vmod/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/geoip-vmod'
make: *** [all] Error 2
[root@d148c4a87432 geoip-vmod]#
If i delete this line in "src/vmod_geoip.vcc" it seems to work OK:
$Init init_function
Is this an error?
Thanks!
I am trying to follow the readme, but there is no configure
file in directory. I tried to run ./configure.ac
, but that doesn't work.
How can I install this on my machine (GNU/Linux)?
Hi,
we've used this great VMOD for some time on Varnish3 without issue. Building a new server from scratch with Varnish4 (centOS based) and have built the GeoIP VMOD ok...
# ls -al /usr/lib64/varnish/vmods/
total 336
drwxr-xr-x 2 root root 4096 Dec 7 12:13 .
drwxr-xr-x 3 root root 4096 Dec 2 12:25 ..
-rwxr-xr-x 1 root root 120206 Dec 1 10:53 libvmod_directors.so
-rw-r--r-- 1 root root 61260 Dec 7 12:13 libvmod_geoip.a
-rwxr-xr-x 1 root root 971 Dec 7 12:13 libvmod_geoip.la
-rwxr-xr-x 1 root root 41337 Dec 7 12:13 libvmod_geoip.so
-rwxr-xr-x 1 root root 99764 Dec 1 10:53 libvmod_std.so
Have the following in the VCL...
import geoip;
sub vcl_recv
{
set req.http.X-Forwarded-For = client.ip;
set req.http.X-GeoIP = geoip.country_code(req.http.X-Forwarded-For);
...
However always getting "AA" for the country code - which the README explains is an error (have also tried the country & contry_code_from_ip equivelant methods). Ive checked that the IP is req.http.X-Forwarded-For is accurately reflecting user's IP. We have the Geoip package installed and the MaxMind .dat files are in place...
# ls -al /usr/share/GeoIP/
total 54620
drwxr-xr-x 2 root root 4096 Dec 7 12:53 .
drwxr-xr-x 81 root root 4096 Dec 7 10:23 ..
lrwxrwxrwx 1 root root 16 Dec 7 10:06 GeoIPASNum.dat -> GeoLiteASNum.dat
-rw-r--r-- 1 root root 4705700 Jul 11 08:44 GeoIPASNumv6.dat
lrwxrwxrwx 1 root root 15 Dec 7 10:06 GeoIPCity.dat -> GeoLiteCity.dat
lrwxrwxrwx 1 root root 17 Dec 7 10:06 GeoIPCityv6.dat -> GeoLiteCityv6.dat
lrwxrwxrwx 1 root root 18 Dec 7 12:53 GeoIP.dat -> GeoLiteCountry.dat
-rw-r--r-- 1 root root 1688515 Jul 11 08:44 GeoIPv6.dat
-rw-r--r-- 1 root root 3958758 Jul 11 08:44 GeoLiteASNum.dat
lrwxrwxrwx 1 root root 16 Dec 7 10:06 GeoLiteASNumv6.dat -> GeoIPASNumv6.dat
-rw-r--r-- 1 root root 21933406 Jul 11 08:44 GeoLiteCity.dat
-rw-r--r-- 1 root root 22721994 Jul 11 08:45 GeoLiteCityv6.dat
-rw-r--r-- 1 root root 904073 Jul 11 08:44 GeoLiteCountry.dat
Any help or guidance on what/where to check next would be greatly appreciated!
Many thanks,
Paul
Hey, thanks for your geoip.
I can see the lines from:
,----
| import geoip;
|
| sub vcl_recv {
| set req.http.X-Forwarded-For = client.ip;
| set req.http.X-GeoIP = geoip.country(req.http.X-Forwarded-For)
| }
you need to put ";" in the last "set req.http.X-GeoIP = geoip.country(req.http.X-Forwarded-For)" like:
set req.http.X-GeoIP = geoip.country(req.http.X-Forwarded-For);
else it doesn't work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.