1. The problem I’m having:
Difficulty with Caddy as reverse proxy to various docker containers.
I am not trying to use HTTPS yet, just want to get reverse_proxy working as simply as possible first.
I am attempting to access things via a static IP (which all works if I open ports etc) eg http://144.6.86.11/homepage (http://144.6.86.11:3000 works)
These containers and caddy are in docker containers on Ubuntu which is installed as a VM on Proxmox with the port forwarded to Caddy - I can access caddy etc - I have a test script which runs on http://144.6.86.11/)
I have latest Caddy installed - with all containers on a network called reverse_proxy_network
The ports are the mapped ports of each container . EG Flatnotes is listening on 8080 but mapped to 8085. So I target flatnotes:8085
Generally no containers are working except Jellyfin.
Some containers will load, but are unable to deliver content as the files they are loading such as javascript or css are blocked. For example console errors show they are requesting files at http://144.6.86.11/_next/static which fails. However it would succeed if i opened the port directly.
So to be clear this will fail http://144.6.86.11/homepage - but the html page shows with no javascript or css files (broken links)
handle_path /homepage* {
reverse_proxy homepage:3000
}
However it will work with the port - directly open. http://144.6.86.11:3000
What is strange is that if I use handle_path /homarr* it fails.
EG this fails:
handle_path /homarr* {
reverse_proxy homarr:7575
}
However this will work.
handle {
reverse_proxy homarr:7575
}
2. Error messages and/or full log output:
caddy-1 | {"level":"info","ts":1732595532.007136,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
caddy-1 | {"level":"info","ts":1732595532.008871,"msg":"adapted config to JSON","adapter":"caddyfile"}
caddy-1 | {"level":"warn","ts":1732595532.0088842,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":3}
caddy-1 | {"level":"info","ts":1732595532.0099447,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
caddy-1 | {"level":"info","ts":1732595532.010211,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
caddy-1 | {"level":"info","ts":1732595532.0104537,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00067ed00"}
caddy-1 | {"level":"info","ts":1732595532.01208,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
caddy-1 | {"level":"info","ts":1732595532.012382,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
caddy-1 | {"level":"info","ts":1732595532.012394,"msg":"serving initial configuration"}
caddy-1 | {"level":"info","ts":1732595532.0161154,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"ba34b56d-ebbc-44e9-985e-1dfd3bef4ddc","try_again":1732681932.0161135,"try_again_in":86399.999999398}
caddy-1 | {"level":"info","ts":1732595532.0163336,"logger":"tls","msg":"finished cleaning storage units"}
caddy-1 | {"level":"info","ts":1732596122.0441136,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"44198","headers":{"Accept-Encoding":["gzip"],"Content-Length":["2799"],"Content-Type":["application/json"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
caddy-1 | {"level":"info","ts":1732596122.045563,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
caddy-1 | {"level":"info","ts":1732596122.0458503,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
caddy-1 | {"level":"info","ts":1732596122.0470948,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
caddy-1 | {"level":"info","ts":1732596122.0471148,"logger":"http","msg":"servers shutting down with eternal grace period"}
caddy-1 | {"level":"info","ts":1732596122.0474205,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
caddy-1 | {"level":"info","ts":1732596122.0476036,"logger":"admin.api","msg":"load complete"}
caddy-1 | {"level":"info","ts":1732596122.0495849,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
caddy-1 | {"level":"error","ts":1732596128.75599,"logger":"http.log.error","msg":"dial tcp 172.25.0.6:3008: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52446","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/","headers":{"Cache-Control":["max-age=0"],"Upgrade-Insecure-Requests":["1"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"If-Modified-Since":["Tue, 26 Nov 2024 01:19:14 GMT"],"If-None-Match":["\"d5vpr4u9hw821gj\""]}},"duration":0.000756295,"status":502,"err_id":"d9m1rvb56","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"info","ts":1732596163.2763247,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"38234","headers":{"Accept-Encoding":["gzip"],"Content-Length":["2798"],"Content-Type":["application/json"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
caddy-1 | {"level":"info","ts":1732596163.277564,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
caddy-1 | {"level":"info","ts":1732596163.277775,"logger":"http.auto_https","msg":"automatic HTTPS is completely disabled for server","server_name":"srv0"}
caddy-1 | {"level":"info","ts":1732596163.278871,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
caddy-1 | {"level":"info","ts":1732596163.278895,"logger":"http","msg":"servers shutting down with eternal grace period"}
caddy-1 | {"level":"info","ts":1732596163.2790902,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
caddy-1 | {"level":"info","ts":1732596163.2790976,"logger":"admin.api","msg":"load complete"}
caddy-1 | {"level":"info","ts":1732596163.2811942,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
caddy-1 | {"level":"error","ts":1732596171.7988179,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/","headers":{"Upgrade-Insecure-Requests":["1"],"Cookie":["REDACTED"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Connection":["keep-alive"],"Cache-Control":["max-age=0"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"]}},"duration":0.000862197,"status":502,"err_id":"8h7ti8z02","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7395568,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/api/config/custom.css","headers":{"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/css,*/*;q=0.1"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"]}},"duration":0.00096169,"status":502,"err_id":"3cag79mwe","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7695816,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52494","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/css/c223d5e83fb92340.css","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/css,*/*;q=0.1"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"]}},"duration":0.001032837,"status":502,"err_id":"6hqymqgpd","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7695913,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52495","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/fa72304b.5562f734f33fbe10.js","headers":{"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"]}},"duration":0.001042844,"status":502,"err_id":"x08d3mgi2","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7705564,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/webpack-ff6990588c3b928e.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000408906,"status":502,"err_id":"wkv1yq2h1","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7707038,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52496","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/7151.bae9be65e631d24f.js","headers":{"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"]}},"duration":0.000953947,"status":502,"err_id":"1j1r7estn","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7715352,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/framework-fb129ad84e3a607e.js","headers":{"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"]}},"duration":0.00067596,"status":502,"err_id":"dswmi6w3i","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7725904,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/main-0ddda9b10a00d3ad.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.000414866,"status":502,"err_id":"8exnms37p","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.791436,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52494","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/pages/_app-2da6463c8d7db6b5.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000927994,"status":502,"err_id":"j5s8xghhh","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.791556,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52495","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/bdd0c3b4-d5f5b5aed8cd8328.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.001175777,"status":502,"err_id":"fyek5a15q","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7916677,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52496","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/2f278442-021d79724fdbde09.js","headers":{"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"]}},"duration":0.00104609,"status":502,"err_id":"ryrz1sxea","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7917974,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/3eea48ae-ac1da50fec44110d.js","headers":{"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"]}},"duration":0.00103158,"status":502,"err_id":"z0p0drcrb","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7919595,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/31659383-e4abe7629b906c35.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.001580817,"status":502,"err_id":"tn1srvy8r","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.7919636,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/9201-12240fd0587e22ee.js","headers":{"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"]}},"duration":0.001104137,"status":502,"err_id":"qu8xutz54","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.8145144,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/pages/index-436cb4e75ae4486d.js","headers":{"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"]}},"duration":0.00072976,"status":502,"err_id":"hb22ri5jc","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.8145463,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/CwPbuoexdZ8g6a4w7pYdo/_buildManifest.js","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"]}},"duration":0.000851612,"status":502,"err_id":"phqkipqsp","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596175.8145292,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/CwPbuoexdZ8g6a4w7pYdo/_ssgManifest.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.000833918,"status":502,"err_id":"6km3ptpze","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4285438,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/api/config/custom.css","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/css,*/*;q=0.1"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.001027354,"status":502,"err_id":"wqt67ca0r","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4311893,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/css/c223d5e83fb92340.css","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["text/css,*/*;q=0.1"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"]}},"duration":0.0006532,"status":502,"err_id":"d6da1sja1","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4447,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/fa72304b.5562f734f33fbe10.js","headers":{"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"]}},"duration":0.000907502,"status":502,"err_id":"zidazqdgp","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.444846,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/7151.bae9be65e631d24f.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.000384458,"status":502,"err_id":"d24dhyec5","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4452572,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/webpack-ff6990588c3b928e.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.00107256,"status":502,"err_id":"uxase7wf8","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4478605,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52496","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/framework-fb129ad84e3a607e.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000564259,"status":502,"err_id":"6qje49uf1","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4502115,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52495","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/main-0ddda9b10a00d3ad.js","headers":{"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"]}},"duration":0.000577698,"status":502,"err_id":"emi1p7qhd","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4520407,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52494","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/pages/_app-2da6463c8d7db6b5.js","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"]}},"duration":0.000569852,"status":502,"err_id":"giypwiwgf","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4621978,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52497","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/bdd0c3b4-d5f5b5aed8cd8328.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000980172,"status":502,"err_id":"94fqie32y","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4649167,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52495","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/31659383-e4abe7629b906c35.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.000653117,"status":502,"err_id":"z1us2ddu5","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4661548,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52494","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/2f278442-021d79724fdbde09.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000573132,"status":502,"err_id":"t3ixz2ixb","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4673207,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52498","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/3eea48ae-ac1da50fec44110d.js","headers":{"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"]}},"duration":0.000541968,"status":502,"err_id":"5bkyx29jj","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4791455,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/9201-12240fd0587e22ee.js","headers":{"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"]}},"duration":0.000665709,"status":502,"err_id":"49jjnneha","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4791503,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52496","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/chunks/pages/index-436cb4e75ae4486d.js","headers":{"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"]}},"duration":0.000672496,"status":502,"err_id":"apr6urpty","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4931946,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52496","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/CwPbuoexdZ8g6a4w7pYdo/_buildManifest.js","headers":{"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"]}},"duration":0.000771289,"status":502,"err_id":"33t3j8508","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596436.4947321,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/_next/static/CwPbuoexdZ8g6a4w7pYdo/_ssgManifest.js","headers":{"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"]}},"duration":0.000578938,"status":502,"err_id":"yu6d4n6gr","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"error","ts":1732596451.8979974,"logger":"http.log.error","msg":"dial tcp 172.25.0.9:8085: connect: connection refused","request":{"remote_ip":"192.168.20.1","remote_port":"52488","client_ip":"192.168.20.1","proto":"HTTP/1.1","method":"GET","host":"144.6.86.11","uri":"/site.webmanifest?v=4","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36"],"Accept":["*/*"],"Referer":["http://144.6.86.11/homepage"],"Accept-Encoding":["gzip, deflate"],"Accept-Language":["en-US,en;q=0.9,en-AU;q=0.8"],"Cookie":["REDACTED"],"Connection":["keep-alive"]}},"duration":0.001473213,"status":502,"err_id":"u6up4eacd","err_trace":"reverseproxy.statusError (reverseproxy.go:1269)"}
caddy-1 | {"level":"info","ts":1732596594.2327225,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"39150","headers":{"Accept-Encoding":["gzip"],"Content-Length":["2798"],"Content-Type":["application/json"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
caddy-1 | {"level":"info","ts":1732596594.2330928,"msg":"config is unchanged"}
caddy-1 | {"level":"info","ts":1732596594.2331054,"logger":"admin.api","msg":"load complete"}
3. Caddy version:
v2.8.4
4. How I installed and ran Caddy:
I am using docker-compose.yml with Caddyfile
a. System environment:
Ubuntu latest running in a container on Proxmox.
b. Command:
docker compose up -d
c. Service/unit/compose file:
services:
caddy:
networks:
- reverse_proxy_network
image: caddy:latest
restart: unless-stopped
ports:
# - "80:80"
- "8080:80"
# - "443:443"
# - "443:443/udp"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./site:/srv
- caddy_data:/data
- caddy_config:/config
volumes:
caddy_data:
caddy_config:
networks:
reverse_proxy_network:
name: reverse_proxy_network
external: true
d. My complete Caddy config:
{
auto_https disable_redirects
auto_https off
}
http://144.6.86.11 {
handle_path /flatnotes* {
reverse_proxy flatnotes:8085
}
handle_path /jellyfin* {
reverse_proxy jellyfin:8096
}
handle_path /news-rss* {
reverse_proxy freshrss:8081
}
handle_path /homepage* {
reverse_proxy homepage:3000
}
handle_path /homarr* {
reverse_proxy homarr:7575
}
handle_path /games* {
reverse_proxy emulatorjs:3008
}
handle {
reverse_proxy flatnotes:8085
# root * /srv
# file_server
}
}