Well, I’ve gotten it to listen on the ipv4 interface now (almost 24 hours ago now, but I haven’t been allowed to post until now), but I still don’t get any response from any browser. I don’t even see the request from the browser with debug enabled…
I’ve changed my Caddyfile to this, for test:
{
debug
}
bygden.nu {
bind bygden.nu
respond "Hello, privacy!"
log {
output file /var/log/caddy/access.log
format logfmt
}
}
But still only response from curl locally and nothing from a remote browser... :(
But - I was running multiple wordpress instances, with different domains (FQDNs) before, which just works with ServerName in Apache 2.
As I added my second domain to my Caddyfile and restarted it complains when coming to the definition of the second domain:
run: loading initial config: loading new config: http app module: start: tcp: listening on erikersara.nu:443: listen tcp 97.107.138.194:443: bind: address already in use
I edited my Caddyfile and then ran systemctl restart caddy and I got the error in /var/log/syslog
I get the same if I try systemctl stop caddy followed by systemctl start caddy
When Caddy outputs this error, it means that the OS told it that it can’t bind 443 because some other program is already using it.
I’m not sure why the OS would reject the bind attempt with this error if there’s not actually any program using it. A rejection based on permissions would be a different error entirely, for example.
Hmm. And if you try with both bind directives commented out? (Presumably they shouldn’t be / were never necessary if the earlier issue was with ufw and has since been resolved.)