I am running a website on my server, and I meet an issue when I am using Caddy
- If I access through IP, I will get the following information
404 Site IP is not served on this interface
I think this means Caddy works
-
If I access through IP and port, I can visit the website, also works well.
-
If I access through the domain name, I will get error
The connection has timed out
The server at domain name is taking too long to respond.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
my Caddyfile is
domainname.com {
proxy / ip:port {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-For {remote}
header_upstream X-Forwarded-Proto {scheme}
}
log /var/log/caddy.log
gzip
}
Any ideas? Thank you so much.