Try to use Caddy to proxy Portainer

HI

I am trying to use Caddy to proxy Portainer.
Portainer is an open-source management UI for Docker.

So I edit the Caddyfile like this:

xxx.xxx.me
{
log ./caddy.log
proxy /xyzxyz 172.17.0.3:10000 {
websocket
header_upstream -Origin
}
proxy /portainer 172.17.0.2:9000 {
websocket
transparent
header_upstream -Origin
}
header / Strict-Transport-Security “max-age=31536000;”
}

But it does not work,when I visit xxx.xxx.me/portainer,it shows 404 page not foundthe log file shows [28/Oct/2018:16:06:38 +0000] "GET /portainer HTTP/2.0" 404 19.
but when I visit server_ip:9000,it works well.
And the xxx.xxx.me/xyzxyz,it works well too.

When you visit xxx.xxx.me/portainer, Caddy will attempt to request 172.17.0.2:9000/portainer (note that the URI carries through).

Portainer expects to be accessed at the URI /, not at /portainer.

1 Like

Oh, I understand.

Thank you very much.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.