Fixing LiteSpeed’s Shortcut-to-404: Deploying a 403.shtml
Summary
We resolved a subtle but disruptive LiteSpeed behavior where denied requests were shortcutting to a 404 error instead of serving the intended 403.shtml page. This fix restores branded UX for blocked visitors and ensures cache integrity across BunnyCDN and LiteSpeed edge logic.
The Problem
LiteSpeed was denying access to certain paths (e.g. /403.shtml
) due to ACL rules, but instead of serving the custom 403 page, it was shortcutting to a 404. This broke the branded experience and confused users and clients alike.
Symptoms:
403.shtml
not served despite existing in/public_html
- Error log showed:
[ACL] Access to context [/] is denied!
File not found [/home/.../403.shtml]
Root Cause
LiteSpeed’s internal ACL logic was blocking access to the context before checking for the existence of 403.shtml
. This caused the server to skip the error page and default to a 404 response.
The Fix
We deployed a branded 403.shtml
page with MegaHost ASCII art and confirmed it loads correctly in the browser:
Live Test: https://megahost.xyz/403.shtml
Steps Taken:
Tail-checked the error log:
Created /home/megahost/public_html/403.shtml
with branded MegaHost ASCII and denial message.
Verified file permissions and ownership.
Restarted LiteSpeed via WHM.
Tail-checked the error log:
tail -n 50 /usr/local/lsws/logs/error.log
✅ No more shortcut-to-404 entries.
Validation
- ✅ Live endpoint test confirmed correct rendering.
- ✅ Error log showed no fallback errors.
- ✅ BunnyCDN edge logic respected the 403 response.