Skip Navigation
Self-Hosted Alternatives to Popular Services @lemmit.online Lemmit.Online bot @lemmit.online
BOT

Cannot reverse proxy to Portainer via Caddy

This is an automated archive made by the Lemmit Bot.

The original was posted on /r/selfhosted by /u/bux024 on 2023-08-06 00:07:54.


Greetings,

I currently have a vServer (rented online) running on Ubuntu including Docker.

Portainer is currently hosted via Docker.

Now I want to use Caddy to reverse-proxy to the Portainer web GUI when visiting pt.mydomain.com

Caddyfile etc. is set up and Caddy does not throw any errors.

My Caddyfile:

pt.mydomain.com {
  reverse_proxy 123.456.789.012:9443
}

The subdomain pt.mydomain.com is registered at my Domain provider.

Now if I go to , the following portainer error appears:

Client sent an HTTP request to an HTTPS server.

As this is a well known Portainer error message, I assume my Caddyfile works.

But what is the reason I cannot access the Portainweb web GUI / why does this error appear even if I use https?

Please note that the server is offline for 90% of the time as I'm still playing around. I know that having stuff exposed to the internet is super risky.

I'm pretty new to the proxy stuff so any help is highly appreciated.

Thanks folks!

0
0 comments