Hi,
I’m Back to basic, I removed the Proxy-Gen solution en tried with the Basic Caddy solution. I checked the solution proposed for Odoo however in conformity with your documentation you don’t need to use either Transparent , Host which are by default enabled in V2 then it rests me NO other choice. Caddy resolves my certificates and for Portainer and Odoo app, however, the error 502 remains. Here my Caddyfile
{
email subs@domain.pro
#acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
netview.domain.pro {
reverse_proxy http://192.168.226.54:9000 {
}
header / Strict-Transport-Security “max-age=31536000;”
}
erp.domain.pro {
reverse_proxy http://172.17.0.2:27073 {
header_up Host {host}
header_up X-Forwarded-Host {host}
header_up Strict-Transport-Security “max-age=31536000;”
}
log {
output file access.log
format single_field common_log
}
encode gzip
}
}
Here the LOG
to enable TLS",“server_name”:“srv0”,“https_port”:443}
{“level”:“info”,“ts”:1600398503.4172134,“logger”:“http”,“msg”:“enabling automatic HTTP->HTTPS redirects”,“server_name”:“srv0”}
2020/09/18 03:08:23 [INFO][cache:0xc000360960] Started certificate maintenance routine
{“level”:“info”,“ts”:1600398503.4200935,“logger”:“tls”,“msg”:“cleaned up storage units”}
{“level”:“info”,“ts”:1600398503.4203727,“logger”:“http”,“msg”:“enabling automatic TLS certificate management”,“domains”:[“erp.domain.pro”,“netview.domain.pro”]}
{“level”:“info”,“ts”:1600398503.431498,“msg”:“autosaved config”,“file”:"/config/caddy/autosave.json"}
{“level”:“info”,“ts”:1600398503.4316738,“msg”:“serving initial configuration”}
{“level”:“error”,“ts”:1600398529.560008,“logger”:“http.log.error.log0”,“msg”:“dial tcp 172.17.0.2:27073: i/o timeout”,“request”:{“method”:“GET”,“uri”:"/",“proto”:“HTTP/2.0”,“remote_addr”:“181.36.253.68:50457”,“host”:“erp.domain.pro”,“headers”:{“Upgrade-Insecure-Requests”:[“1”],“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.9”],“Sec-Fetch-Site”:[“cross-site”],“Sec-Fetch-Mode”:[“navigate”],“Accept-Encoding”:[“gzip, deflate, br”],“Accept-Language”:[“en-US,en;q=0.9”],“Cache-Control”:[“max-age=0”],“User-Agent”:[“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36”],“Sec-Fetch-User”:["?1"],“Sec-Fetch-Dest”:[“document”]},“tls”:{“resumed”:false,“version”:772,“ciphersuite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“erp.domain.pro”}},“duration”:10.000787923,“status”:502,“err_id”:“861v01c5r”,“err_trace”:“reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:411)”}
{“level”:“error”,“ts”:1600398542.9394174,“logger”:“http.log.error.log0”,“msg”:“dial tcp 172.17.0.2:27073: i/o timeout”,“request”:{“method”:“GET”,“uri”:"/",“proto”:“HTTP/2.0”,“remote_addr”:“181.36.253.68:50467”,“host”:“erp.domain.pro”,“headers”:{“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.9”],“Sec-Fetch-Site”:[“none”],“Sec-Fetch-Dest”:[“document”],“User-Agent”:[“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36”],“Sec-Fetch-Mode”:[“navigate”],“Sec-Fetch-User”:["?1"],“Accept-Encoding”:[“gzip, deflate, br”],“Accept-Language”:[“en-US,en;q=0.9”],“Upgrade-Insecure-Requests”:[“1”]},“tls”:{“resumed”:false,“version”:772,“ciphersuite”:4865,“proto”:“h2”,“proto_mutual”:true,“server_name”:“erp.domain.pro”}},“duration”:10.000625199,“status”:502,“err_id”:“mw4eun558”,“err_trace”:“reverseproxy.(*Handler).ServeHTTP (reverseproxy.go:411)”}