1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
a. System environment:
Ubuntu 20.04.5 LTS on a DigitalOcean droplet. Not containerized within the droplet.
b. Command:
caddy reload Caddyfile
c. Service/unit/compose file:
I don’t have one.
d. My complete Caddy config:
{
servers {
metrics
}
}
youngren.io www.youngren.io {
encode gzip
root * /var/www/youngren.io
log {
output file /var/log/caddy/youngren.io/access.log
}
file_server
}
ems.youngren.io {
encode gzip
root * /var/www/ems.youngren.io/build
log {
output file /var/log/caddy/ems.youngren.io/access.log
}
file_server
}
spacerocks.youngren.io {
encode gzip
root * /var/www/spacerocks.youngren.io
log {
output file /var/log/caddy/spacerocks.youngren.io/access.log
}
file_server
}
snake.youngren.io {
encode gzip
root * /var/www/snake.youngren.io
log {
output file /var/log/caddy/snake.youngren.io/access.log
}
file_server
}
fire.youngren.io {
encode gzip
root * /var/www/fire.youngren.io
log {
output file /var/log/caddy/fire.youngren.io/access.log
}
file_server
}
rpe.youngren.io {
encode gzip
root * /var/www/rpe.youngren.io/dist
log {
output file /var/log/caddy/rpe.youngren.io/access.log
}
file_server
}
3. The problem I’m having:
When I look at my metrics in the Prometheus instance running on the same machine, all of the requests counts, save for handler=“subroute” went to 0 around the time I upgraded caddy. I would expect all of the metrics to continue to register after upgrading.
I will note here that I don’t fully understand the implications of the different metrics and have been relying on “file_server” to give me a general idea of the number of http requests as made by a user loading the website in a browser, which is the only thing I care about.
4. Error messages and/or full log output:
No error messages.
5. What I already tried:
Restarting caddy. I’ve read the caddy documentation on the “subroute” handler as well as the “file_server” handler but it’s not clear why one would keep working when the other stopped.
I should say that the extent of my caddy use is hosting these static sites and the extent of my prometheus use is trying to see how many hits these sites are getting. I know just enough to get it working. Or, I did.
6. Links to relevant resources:
Thank you for your time.