We run a travel blog (joyofexploringtheworld.com) that helps people plan itineraries—hosted on a low-cost VPS with Docker Compose and Cloudflare. One small performance tweak took the whole site offline for an hour. Here’s what happened and how we fixed it.
What Went Wrong Link to heading
We added a Traefik compression middleware to speed up responses. The new config lived in a separate YAML file. Traefik was configured to load only a single file (e.g. real-ip.yaml), not the whole directory. The router referenced compress@file, but that file was never loaded. Every request failed.
The Fix Link to heading
We merged the compression middleware into the file Traefik actually loads. Once the middleware existed in the loaded config, the site came back immediately.
# config/traefik/real-ip.yaml — all middlewares in one file
http:
middlewares:
real-ip-cf:
plugin:
real-ip:
Proxy:
- realIP: Cf-Connecting-Ip
OverwriteXFF: true
compress:
compress:
encodings:
- br
- gzip
minResponseBodyBytes: 1024
Lesson for Readers Link to heading
When you add a new feature—reverse proxy, CDN, plugin, or middleware—confirm how config is loaded. Is it a single file or a directory? If it’s a single file, put new middlewares in that file. Test before assuming the change is active.
What You Can Do Link to heading
- Check your Traefik
--providers.file.filename(ordirectory) setting. - Add new middlewares to the file that Traefik loads.
- Restart Traefik and verify the middleware appears in the API/dashboard.
- Test a sample request before declaring victory.
The full Traefik config is in the companion repo.
See also: Running a WordPress Travel Blog on a Budget VPS: The Full Stack | Rank Math Sitemap Not Loading with Traefik
Built for a travel blog on a budget. This stack powers Joy of Exploring the World — curated travel itineraries, restaurant reviews, and destination guides. If you're planning your next trip, come explore with us.
All config files from this post are in the companion GitHub repo.