Hello, I am moving this discussion here from another thread because that one had some other concerns re: Varnish, etc.
Here's my situation:
I have a vBulletin 4.2.2 PL4 forum at
My forum is installed at at $DOCUMENT_ROOT not at $DOCUMENT_ROOT/forum
I am not using vBSEO.
I use Litespeed 2-core version and have been trying to get LSCache to work for guests on my forum, but no matter what I do members are experiencing weird issues with appearing logged out on seemingly random pages as well as sometimes experiencing random changes in forum style applied.
Here's what I've done:
1) Created litespeed_cache.xml from the code on this page and imported it as a product through my vBulletin Admin CP with allow overwrite enabled.
2) Ran the following from SSH as root:
Added the following to the cron list and then wrote out and closed:
3) Went to LS admin console under Cache and set the following settings:
4) Added the following to .htaccess in the domain root:
After doing all that, my guest pages are being cached by Litespeed Cache. “X-LiteSpeed-Cache: hit” response header is verified, and guest browsing is lightning fast. However right away my members start to complain about the login issues, etc. Would greatly appreciate some guidance.
Thanks,
Amin
Here's my situation:
I have a vBulletin 4.2.2 PL4 forum at
Code:
www.photographerslounge.org
I am not using vBSEO.
I use Litespeed 2-core version and have been trying to get LSCache to work for guests on my forum, but no matter what I do members are experiencing weird issues with appearing logged out on seemingly random pages as well as sometimes experiencing random changes in forum style applied.
Here's what I've done:
1) Created litespeed_cache.xml from the code on this page and imported it as a product through my vBulletin Admin CP with allow overwrite enabled.
2) Ran the following from SSH as root:
Code:
# mkdir /dev/shm/diskcache
# chown nobody:nobody /dev/shm/diskcache
# chmod 700 /dev/shm/diskcache
# crontab -e
Code:
*/10 * * * * root find /dev/shm/diskcache -type f -mmin +8 -delete 2>/dev/null
# /etc/init.d/crond restart
Code:
Storage path: /dev/shm/diskcache
Enable Cache: No
Cache Expire Time (seconds): Not Set
Cache Request with Query String: Yes
Cache Request with Cookie: Yes
Cache Response with Cookie: Yes
Ignore Request Cache-Control: Yes
Ignore Response Cache-Control: Yes
Enable Private Cache: No
Private Cache Expire Time (seconds): Not Set
Do-Not-Cache URL(s): Not Set
Code:
RewriteEngine On
## Forward non-www to www
RewriteCond %{HTTP_HOST} ^photographerslounge.org
RewriteRule (.*) http://www.photographerslounge.org/$1 [R=301,L]
## Forward index.php to root directory
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
## Forward vBSEO to non-vBSEO URLs after uninstalling vBSEO
RewriteRule [^/]+/[^/]+-([0-9]+)/ http://www.photographerslounge.org/showthread.php?t=$1 [L,R=301]
RewriteRule ^f([0-9]+)/$ http://www.photographerslounge.org/forumdisplay.php?f=$1 [L,R=301]
RewriteRule ^members/(.+)/ http://www.photographerslounge.org/member.php?username=$1 [L,R=301]
## select which pages to cache
RewriteCond %{HTTP_COOKIE} !bbimloggedin=yes
RewriteCond %{HTTP_COOKIE} !bbuserid=
RewriteCond %{HTTP_COOKIE} !bbpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image)\.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteRule ^(.*\.php)?$ - [E=Cache-Control:max-age=120]
Thanks,
Amin
Last edited by a moderator: