vB seo + litespeed cache

#62
Hi everyone!
I'm using OpenLiteSpeed 1.4.50, vBulletin 4.2.5 and DBSEO. I have never been able to generate the header "X-LiteSpeed-Cache: hit". Is the plug-in from this tutorial up to date: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cache:no-plugin-vbseo?

I don't have a header, but the cache seems to work - files are being created in cachedata.

I tried with different .htaccess, below is an example:
RewriteCond %{HTTP_COOKIE} !(vbisa_imloggedin=yes|vbisa_userid|vbisa_password) [NC] RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image) \.php$ [NC] RewriteRule .* - [E=Cache-Control:max-age=120]


Can anyone help me? I have big problems with DDoS attacks. I need LSCache.
 
#64
Looking at load, it looks like the cache is working somehow. It fell drastically and the site loads at least 1/4 faster.

However, the header looks like this:
Code:
$ curl -k -I https://www.forum.xxx.xxx
HTTP/2 200
set-cookie: vb_sessionhash=221c4fcde3fad3047bb3026af81452dd; path=/; HttpOnly
set-cookie: vb_lastvisit=1568233947; expires=Thu, 10-Sep-2020 20:32:27 GMT; Max-Age=31536000; path=/; secure
set-cookie: vb_lastactivity=0; expires=Thu, 10-Sep-2020 20:32:27 GMT; Max-Age=31536000; path=/; secure
set-cookie: PHPSESSID=k4rrfnb88saftbd370e7pvcmls; path=/
set-cookie: vbet_sessionUsed=1; path=/
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: private
pragma: private
content-type: text/html; charset=utf-8
date: Wed, 11 Sep 2019 20:32:27 GMT
server: LiteSpeed
Is my cache working properly?
 
#66
If LS can work if it's faster then I'm even more happy. I am asking for help in diagnosis. I attach my data. If I should attach more data, please let me know.

My httd.conf (/usr/local/lsws/conf/httpd_config.conf)
Code:
module cache {                                                                                                                                                                                                                                           
qsCache             1                                                                                                                                                                                                                                    
reqCookieCache      1                                                                                                                                                                                                                                    
respCookieCache     1                                                                                                                                                                                                                                    
ignoreReqCacheCtrl  1                                                                                                                                                                                                                                    
ignoreRespCacheCtrl 1                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                         
enableCache         0                                                                                                                                                                                                                                    
expireInSeconds                                                                                                                                                                                                                                          
enablePrivateCache  0                                                                                                                                                                                                                                    
privateExpireInSeconds                                                                                                                                                                                                                                   
  ls_enabled              1                                                                                                                                                                                                                              
}
My plugin to vB:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="lswscache" active="1">
        <title>Litespeed Caching</title>
        <description>settings to make Litespeed page cache working right</description>
        <version>1.0</version>
        <url />
        <versioncheckurl />
        <dependencies>
        </dependencies>
        <codes>
        </codes>
        <templates>
        </templates>
        <plugins>
                <plugin active="1" executionorder="1">
                        <title>Unset session id for guest users</title>
                        <hookname>global_start</hookname>
                        <phpcode><![CDATA[if($vbulletin->userinfo['userid'] <= 0)
{
$vbulletin->session->vars['sessionurl']  = '';
$vbulletin->session->vars['sessionurl_q']  = '';
}]]></phpcode>
                </plugin>
                <plugin active="1" executionorder="1">
                        <title>SET COOKIE FOR LOGGED IN USERS</title>
                        <hookname>login_verify_success</hookname>
                        <phpcode><![CDATA[if ($send_cookies AND $cookieuser)
{
// Cookie user
vbsetcookie('imloggedin', 'yes', true, true, true);
}
else
{
// Not permanent
vbsetcookie('imloggedin', 'yes', false, true, true);
}]]></phpcode>
                </plugin>
                <plugin active="1" executionorder="1">
                        <title>Send X-LiteSpeed-Cache-Control header for logged in users</title>
                        <hookname>style_fetch</hookname>
                        <phpcode><![CDATA[// Do not cache logged in user pages
if ( $vbulletin->userinfo['userid'] )
{
        header('X-LiteSpeed-Cache-Control: no-cache');
};]]></phpcode>
                </plugin>
        </plugins>
        <phrases>
        </phrases>
        <options>
        </options>
        <helptopics>
        </helptopics>
        <cronentries>
        </cronentries>
        <faqentries>
        </faqentries>
</product>
My .htaccess in vb forum dir
Code:
Header unset Server
RewriteEngine On

RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?forum\.xxx\.xxx
RewriteRule ^(.*)$ https://www.forum.xxx.xxx/$1 [R,L]

RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|hy|az|eu|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|ka|de|el|ht|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|ur|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]

RewriteCond %{REQUEST_URI} !(admincp/|dbseocp/|modcp/|cron|mobiquo|forumrunner|api\.php|reviewpost/|classifieds/|photopost/)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ dbseo.php [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|dbseocp|modcp|clientscript|cpstyles|images|reviewpost|classifieds|photopost)/
RewriteRule ^(.+)$ dbseo.php [L,QSA]

RewriteCond %{HTTP_COOKIE} !(vb_imloggedin=yes|vb_userid|vb_password) [NC]
RewriteCond %{REQUEST_URI} !^(login|register|usercp|private|profile|cron|image) \.php$ [NC]
RewriteCond %{REQUEST_URI} !^/admincp/ [NC]
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteRule .* - [E=Cache-Control:max-age=120]

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType text/css A2592000
 
Top