lampeh / libvmod-geoip

This Varnish module exports functions to look up GeoIP country codes in VCL
Other
13 stars 22 forks source link

geoIP debug #8

Open artursv opened 10 years ago

artursv commented 10 years ago

Is there any way to debug the library?

I have successfully (i guess) installed the modules in /usr/lib/varnish/vmods. Now I'm trying to display country code in headers. I import the mod with import geoip and use _set req.http.X-GeoIP = geoip.client_countrycode();

After that I restart varnish and receive no complaints. However my site no longer works. If I remove the client_coutry_code() line all is good.

$ varnishd -V varnishd (varnish-3.0.5 revision 1a89b1f)

artursv commented 10 years ago

Update:

I fixed problem I described in previous post. As it turned out I was missing GeoIP database file.

However I still can't get it to work. GeoIP headers return X-GeoIP:Unknown instead of country code.