Caddy: unfunctional caddy geoip

Created on 24 Jan 2019  路  6Comments  路  Source: caddyserver/caddy

1. What version of Caddy are you using (caddy -version)?

last official from web, source, 0.11.2, 0.11.0 0.10.4...

2. What are you trying to do?

using caddy-geoip

3. What is your entire Caddyfile?

:2015 {
    tls off

    root /srv/html
    log stdout

    geoip GeoLite2-City.mmdb # or Country .. whatever

    header / {
        Country-Code {geoip_country_code}
        IP {remote}
    }

4. How did you run Caddy (give the full command and describe the execution environment)?

./caddy -conf Caddyfile

5. Please paste any relevant HTTP request(s) here.

> GET / HTTP/1.1
> Host: xxx.xxx.xxx.xxx:2015
> User-Agent: curl/7.63.0
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< Content-Type: text/plain; charset=utf-8
< Country-Code: 
< Ip: xxx.xxx.xxx.xxx
< Server: Caddy
< X-Content-Type-Options: nosniff
< Date: Thu, 24 Jan 2019 12:47:25 GMT
< Content-Length: 14
< 
404 Not Found

6. What did you expect to see?

Non empty Country-Code

link: https://github.com/kodnaplakal/caddy-geoip/issues/12

Most helpful comment

This appears to be a bug report for a third-party plugin, not Caddy itself; please report the issue with the plugin repository.

All 6 comments

I can confirm such behavior.

This appears to be a bug report for a third-party plugin, not Caddy itself; please report the issue with the plugin repository.

ok thanks. I'll rather go back to nginx...

@scippio I checked and all work's fine. I don't understand your Caddyfile try it make simple, like this:

YOU_DOMAIN.COM {
    geoip /Downloads/GeoLite2-City.mmdb
    proxy / localhost:3000 {
     header_upstream Country-Code {geoip_country_code}
    }
}

Ok thanks. I'll rather go back to nginx...

That's totally fine, just keep in mind that the Caddy project is not responsible for 3rd party plugins.

Ok thanks. I'll rather go back to nginx...

That's totally fine, just keep in mind that the Caddy project is not responsible for 3rd party plugins.

obviously

Was this page helpful?
0 / 5 - 0 ratings