hi,
i tried to setup without port 80 and trying to reverse proxy to my grpc services,
but it seems to trying to bind to port 443 even thou ive specified my custom port
here is my sample /etc/caddy/Caddyfile
https://grpc.example.com:8080 {
tls /etc/letsencrypt/archive/grpc.example.com/fullchain1.pem /etc/letsencrypt/archive/grpc.example.com/privkey1.pem
reverse_proxy localhost:8096
reverse_proxy localhost:8097
reverse_proxy localhost:8098
reverse_proxy localhost:8099
}
skip_certificates ["grpc.example.com"]
and got this logs with caddy failing:
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: JOURNAL_STREAM=9:33512689
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: {"level":"info","ts":1591725435.4115653,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: {"level":"info","ts":1591725435.4188461,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["localhost:2019","[::1]:2019","127.0.0.1:2019"]}
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: 2020/06/09 17:57:15 [INFO][cache:0xc000778370] Started certificate maintenance routine
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: {"level":"info","ts":1591725435.4203157,"logger":"http","msg":"skipping automatic certificate management because one or more matching certificates are already loaded","domain":"grpc.example.com","server_name":"srv0"}
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: {"level":"info","ts":1591725435.4257758,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: {"level":"info","ts":1591725435.4264827,"logger":"tls","msg":"cleaned up storage units"}
Jun 09 17:57:15 ip-192-168-0-202 caddy[22116]: run: loading initial config: loading new config: http app module: start: tcp: listening on :80: listen tcp :80: bind: address already in use
Jun 09 17:57:15 ip-192-168-0-202 systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Jun 09 17:57:15 ip-192-168-0-202 systemd[1]: caddy.service: Failed with result 'exit-code'.