Caddy v2.2.1 doesn't seem to respect the port of a given address in this Caddyfile
:
myfinedomain.com:9999 {
respond "Nothing to see here. Srsly."
}
Starting up caddy simply results in the following error (taken from the log):
{"level":"info","ts":1614777947.500496,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1614777947.5004952,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0002d2380"}
run: loading initial config: loading new config: http app module: start: tcp: listening on :80: listen tcp :80: bind: address already in use
start: caddy process exited with error: exit status 1
{"level":"info","ts":1614778157.9187949,"msg":"using provided configuration","config_file":"/usr/local/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
{"level":"info","ts":1614778157.9210048,"logger":"admin","msg":"admin endpoint started","address":"tcp/localhost:2019","enforce_origin":false,"origins":["[::1]:2019","127.0.0.1:2019","localhost:2019"]}
{"level":"info","ts":1614778157.9213488,"logger":"http","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1614778157.92195,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc0002be3f0"}
run: loading initial config: loading new config: http app module: start: tcp: listening on :80: listen tcp :80: bind: address already in use
start: caddy process exited with error: exit status 1
Thus, caddy seems to try binding to port 80, which it shouldn't do.
The documentation lists the port as being a valid option for addresses.
Ideas on what might be missing here are appreciated.