GithubHelp home page GithubHelp logo

geoip-vmod's People

Contributors

abautu avatar flecoz avatar smalot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

geoip-vmod's Issues

No rule to make target @VMODTOOL@

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

ERROR: Format error reading "../src/vmod_geoip.vcc": 'Unknown keyword: $Init'

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!

Update Installation Process

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)?

Installed OK but country always AA - help troubleshooting

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

README BAD

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.