I can confirm that I am having the same issue. I am not exactly sure what to provide in terms of logs because nothing is outputting in mine.
Replication of the problem:
Internally to my network, I can access all sites fine with no delays(but this shouldn’t be going through caddy). When accessing sites from external links, subdomains are taking upwards of 60 seconds before displaying anything. After the initial load though, it becomes normal speed. It’s as if it’s “warming” up.
This issue seems to be related to subdomains and not original domains. I can gladly provide any information needed to help with troubleshooting as this issue is becoming very annoying.
My setup:
Host: Unraid Server - Official Docker Container for Caddy
(dual xeon 8-core with 256GB of DDR3 memory)
The docker network for this container is bridged to the host; port 80 → 2080 and 443->2443.
Router: Linksys Velop AX Mesh Network - Hard-line connection to server (CAT6).
Router port forwards 80 and 443 to host’s 2080 and 2443.
Here is my Caddyfile:
{
http_port 8080
https_port 8443
}
www.site1.com, site1.com {
root * /srv/site1.com
file_server
encode gzip
}
www.site2.com, site2.com {
root * /srv/site2.com
file_server
encode gzip
}
media.site3.io {
reverse_proxy 192.168.1.25:8123
encode gzip
}
blog.site3.io {
reverse_proxy 192.168.1.25:10001
encode gzip
}
home.site3.io {
reverse_proxy 192.168.1.25:8096
encode gzip
}
All other configs related to caddy are default.