So currently I have caddy running in my docker environment via the abiosoft/caddy docker image. So far I was able to get most of my services running as sub-directories. (Need to use sub directories, because I did not setup the docker image with the googlecloud dns plugin originally, so I don’t hit the LE limit.).
According to an issue I found on the portainer github, you can startup portainer with the environment variable “-e HTTP_proxy=” , “-e HTTPS_proxy=” flags. I have these both set to “/portainer.” Now when I navigate to mydomain.net/portainer I get this:
On portainer’s documentation page they have an nginx example config and was wondering how I would “clone” it for caddy to make this sub-directory work. I am a complete noob at this.
Now for Windows Admin Center I have no clue how to get that one working due to the fact there is like no documentation for it when it comes to reverse proxy support. So any help with this one would be greatly appreciated.
This seems to be a bug in portainer (#609).
It may work if you add a slash to the end of the proxy directive, e.g. proxy /portainer/ 192.168.1.60:9000 { and proxy /portainer/api/websocket/ 192.168.1.60:9000 {
Remove websocket from the first directive. You could also try header_upstream -Connection in the first directive (as well as removing websocket) to completely remove the Connection header. Presumably, that’s why proxy_set_header Connection ""; is in the nginx configuration.
This seems to be a bug in portainer (#609).
It may work if you add a slash to the end of the proxy directive, e.g. proxy /portainer/ 192.168.1.60:9000 { and proxy /portainer/api/websocket/ 192.168.1.60:9000 {
I don’t think Windows Admin Center will work well with Caddy, as it seems to require a client certificate. Using a reverse proxy like Caddy may require you to reconfigure WAC to ignore client certificates, or to install a different certificate in your browser.
Hmm I wonder if I can even set it to ignore client certificates. Right now its just running with a self signed cert. I guess I will look into that when I get home.
Hey @comp500 I was playing around with stuff to get Windows Admin Center to work and was able to successfully get the login window (browser popup) to work. Though when I login I get a 502 Bad Gateway error.
Just updating this thread real quick to bring some closure.
I did finally reverse proxy WAC successfully (it requires that keep-alive is not disabled, and that HTTP/2 is disabled). The hardest part was getting the NTLM authentication to proxy successfully, as it violates HTTP’s conventions of being stateless.
I am not sure what negative side-effects or implications my implementation has, but it works! It effectively does what nginx’s commercial ntlm module does: Module ngx_http_upstream_module
I have a lot of code cleanup to do but will be pushing it once it’s looking good.