Bunny CDN Test Image Not Loading from Root Domain: The Fix and the Unexpected Twist

When setting up Bunny CDN, the first step is often to check the test image. If it loads from your origin, you know the CDN can pull content. But what happens when the test image won’t load from your root domain — even though the file is right there on the server?

That’s exactly the problem we faced with megahost.xyz.

The Symptom

  • Visiting https://megahost.xyz/sasa.jpg returned a 404 Not Found page.
  • The file existed in /home/megahost/public_html/.
  • DNS and SSL for the root domain were fine.
  • Bunny CDN was configured to use the root domain as the origin.

The Investigation

We confirmed:

  • The file was present and readable in public_html.
  • No .htaccess rules were obviously blocking them.
  • LiteSpeed was serving the main site fine — but static file requests for this image wasn’t resolving.

This pointed to a LiteSpeed virtual host configuration issue for the root domain.

The Fix Attempt

  1. Created/Adjusted LiteSpeed Virtual Host for Root Domain
    • Ensured megahost.xyz was mapped to /home/megahost/public_html with correct static file handling.
    • Verified MIME types and caching headers were set.
  2. Mapped the Domain in the HTTPS Listener
    • Added megahost.xyz and www.megahost.xyz to the listener’s Virtual Host Mappings.
  3. Restarted LiteSpeed
    • Applied the new configuration.
  4. Purged Bunny CDN Cache
    • Forced Bunny CDN to re‑fetch the file from the origin.

The Twist: It Still Didn’t Work

Even after all that, https://megahost.xyz/sasa.jpg still returned a 404. At this point, the origin mapping was correct, the listener was correct, and the file was in public_html.

The culprit? Case sensitivity.

On Linux servers, Sasa.jpg and sasa.jpg are two completely different files. The file on the server was named Sasa.jpg (capital “S”), but the browser request was for sasa.jpg (lowercase “s”).

The Real Fix

  • Renamed the file to match the URL exactly:Codemv /home/megahost/public_html/Sasa.jpg /home/megahost/public_html/sasa.jpg
  • Cleared LiteSpeed cache.
  • Reloaded the URL — and it worked instantly.

Lessons Learned

  • Always check filename case — especially when moving between Windows/macOS (case‑insensitive) and Linux (case‑sensitive) environments.
  • Map your domain in LiteSpeed listeners so requests hit the right vhost.
  • Purge caches after changes to avoid stale results masking the fix.

Post Your Comment