Can
Active member
Hi everyone,
I recently set up a new XenForo forum (LiteSpeed + Redis + Cloudflare Free). The server belongs to me and is running AlmaLinux 10.
To achieve the best performance, I configured several caching and optimization layers.
Before going live, I would like to confirm whether the following setup is correct and conflict-free.
1. LiteSpeed Cache (.htaccess configuration)
I added LiteSpeed’s recommended XenForo block at the top of .htaccess
Goal:
Redis is enabled only for object caching.
No full-page caching, no HTML caching.
3. Cloudflare Settings (Free Plan)
Cloudflare is configured to cache only static assets:
Other Cloudflare settings:
I recently set up a new XenForo forum (LiteSpeed + Redis + Cloudflare Free). The server belongs to me and is running AlmaLinux 10.
To achieve the best performance, I configured several caching and optimization layers.
Before going live, I would like to confirm whether the following setup is correct and conflict-free.
1. LiteSpeed Cache (.htaccess configuration)
Quickly and easily implement high-performance page caching on your XenForo forum
- Michael A.
- add-on cache full page caching litespeed performance
- Add-ons [2.x]
I added LiteSpeed’s recommended XenForo block at the top of .htaccess
Code:
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# Guest cache
RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteCond %{REQUEST_URI} !/install/ [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
# Logged-in no cache
RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
</IfModule>
- Faster delivery for guests
- No HTML caching for logged-in users/admin
- Avoid breaking XenForo’s dynamic pages
Redis is enabled only for object caching.
No full-page caching, no HTML caching.
3. Cloudflare Settings (Free Plan)
Cloudflare is configured to cache only static assets:
- CSS
- JS
- Images
- Fonts
Other Cloudflare settings:
- SSL: Full (Strict)
- Rocket Loader: OFF
- Minify: HTML + CSS ON / JS OFF
- Tiered Cache: OFF
- Early Hints: ON
- Admin / login URLs: Cache bypass
- Browser TTL: 1 day
Goal of this setup- Keep HTML fully dynamic
- Let Cloudflare cache only static content
- Use Redis to reduce PHP/MySQL load for logged-in users
- Let LiteSpeed handle optimized delivery without full-page caching
- Ensure no conflicts between Cloudflare, LiteSpeed, and Redis
- QUESTION
Is this configuration considered correct and recommended for XenForo running on LiteSpeed with Redis and Cloudflare Free?
Any conflicts or incorrect approaches that I should reconsider?
Thanks in advance for your feedback.