1. The problem I’m having:
I am trying to get caddy working as a reverse proxy in Windows docker and I’m having some trouble. The Caddy container starts up fine.
I got the domain at Namecheap and created an A record to point to my public IP. If I ping my domain name I get my public IP responding so I know this is working.
When I go to the domain in a web browser nothing shows up in the browser. I expect it to show photoprism, which is what it should be pointing to in my Caddyfile.
Can someone help me out? I’m not new to docker but I’m new to reverse proxies and this is giving me a run for my money.
2. Error messages and/or full log output:
No errors but here is the log from docker when I start it:
2023-11-05 08:07:19 {"level":"info","ts":1699189639.7120357,"msg":"shutting down apps, then terminating","signal":"SIGTERM"}
2023-11-05 08:07:19 {"level":"warn","ts":1699189639.7120962,"msg":"exiting; byeee!! 👋","signal":"SIGTERM"}
2023-11-05 08:07:19 {"level":"info","ts":1699189639.7121816,"logger":"http","msg":"servers shutting down with eternal grace period"}
2023-11-05 08:07:19 {"level":"info","ts":1699189639.71237,"msg":"shutdown complete","signal":"SIGTERM","exit_code":0}
2023-11-05 08:07:20 {"level":"warn","ts":1699189640.5766304,"logger":"admin","msg":"admin endpoint disabled"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.5767314,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"static","https_port":443}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.5767527,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"static"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.576954,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.5769885,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000616b00"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.5771205,"logger":"http.log","msg":"server running","name":"static","protocols":["h1","h2","h3"]}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.5771437,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.577146,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["6384922.xyz"]}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.6031368,"msg":"Caddy serving static files on :443"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.6032937,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/data/caddy"}
2023-11-05 08:07:20 {"level":"info","ts":1699189640.690513,"logger":"tls","msg":"finished cleaning storage units"}
3. Caddy version:
v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=
4. How I installed and ran Caddy:
In Windows Docker
a. System environment:
Windows 11 Docker
b. Command:
docker run -p 80:80 -p 443:443 -p 443:443/udp --name caddy -d -e TZ=America/New_York --cap-add=NET_ADMIN -v C:\DockerConfigs\caddy\data:/data -v C:\DockerConfigs\caddy\config:/config -v C:\DockerConfigs\caddy\Caddyfile\Caddyfile:/etc/caddy/Caddyfile --restart unless-stopped caddy caddy file-server --domain 6384922.xyz
c. Service/unit/compose file:
Im not using a compose file
d. My complete Caddy config:
6384922.xyz {
reverse_proxy photoprism:2342
}