Caddy: [Grafana] Reverse proxy not working with Caddy2 but Caddy1

Created on 8 May 2020  路  3Comments  路  Source: caddyserver/caddy

Hey!

I observed some very strange behavior: Reverse proxy with Grafana is working like a charm, when using Caddy1. Both servers are running a docker container.

As soon as i switch to Caddy2 i only see a blank page.

Caddyfile1
grafana.domain.net { proxy / http://grafana:3000 }

Caddyfile2
grafana.domain.net { reverse_proxy / http://grafana:3000 }

I already checked the migration documentation and i can't see any specific why this should not work. Anybody with a similar behavior when migrating from v1 to v2?

question

Most helpful comment

Hi! Thanks for trying Caddy! Looks like you already got the help you needed.

For next time, please ask your usage questions on the Caddy community forums. We prefer to keep the GitHub issue board for bugs and feature requests. Don't forget to fill out the thread template so we can help you!

All 3 comments

Try:

 grafana.domain.net { reverse_proxy http://grafana:3000 }

With your caddyfile2, what's happening is requests to only / are matched and the other subpaths are getting ignored since they are not being handled. By default, reverse_proxy without a matcher works for all requests.

Hi! Thanks for trying Caddy! Looks like you already got the help you needed.

For next time, please ask your usage questions on the Caddy community forums. We prefer to keep the GitHub issue board for bugs and feature requests. Don't forget to fill out the thread template so we can help you!

Yep, and our upgrade guide explains this: https://caddyserver.com/docs/v2-upgrade#primary-changes

Thanks for the answer @kayg04 !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhilmacFLy picture PhilmacFLy  路  3Comments

kilpatty picture kilpatty  路  3Comments

klaasel picture klaasel  路  3Comments

ericmdantas picture ericmdantas  路  3Comments

billop picture billop  路  3Comments