Hello!
I just installed OLS Web Server and LScache following the official openlitespeed.org guidelines, but the cache did not work for me. My stack is:
VPS -> CentOS 7 (Updated) -> OLS (1.4.41) -> MariaDB 10.1 -> PHP7.2 (lsphp72 lsphp72-common lsphp72-mysqlnd lsphp72-gd lsphp72-process lsphp72-mbstring lsphp72-xml lsphp72-mcrypt lsphp72-pdo lsphp72-imap lsphp72-soap lsphp72-bcmath lsphp72-intl lsphp72-json lsphp72-opcache) -> Wordpress 5.0.2. I use the GeneratePress theme and I have the LiteSpeed Cache 2.9 plug-in installed.
I have correctly configured the external app and script handler to have php 7.2. I have also configured the virtual host and listerner well. Wordpress works correctly.
But for some reason that I do not know, the cache is not working. In the response headers there is 'X-LiteSpeed-Cache-Control: public, max-age: 604800' and 'X-LiteSpeed-Tag: 2271_PGSRP, 2271_home, 2271_URL.6666cd76f96956469e7be39d750cc7d9,2271_F, 2271_'. But does not appear 'X-LiteSpeed-Cache: miss / hit'.
'Cache-control: no-cache' and 'Pragma: no-cache' appear in the request headers.
'Cache.so' appear in /lsws/modules/ and in /lsws/cachedata/ appear '0'. In server configuration -> modules -> I have configured the cache module with these parameters
----------------------------------
enableCache 0
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0
enablePrivateCache 0
privateExpireInSeconds 1000
expireInSeconds 1000
storagePath cachedata
checkPrivateCache 1
checkPublicCache 1
----------------------------------
In virtual host -> rewrite > i have configured these parameters:
----------------------------------
Enable Rewrite: Yes
Auto Load from .htaccess: No
Rewrite Rules: rewriteFile /usr/local/lsws/TyV/html/.htaccess
----------------------------------
The cache is enabled in the plug-in LSCache 2.9, and in wp-config-php it is set define('WP_CACHE', 'true').
The .htaccess file contains:
--------------------------------------------------------------------------------------------
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:wp-postpass_f6ca0217b63d378f392aa75ac5d443e5"]
### marker LOGIN COOKIE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
--------------------------------------------------------------------------------------------
I have been testing different configurations and I have given permission 777 the entire folder /lsws/ and their children, but the cache does not work. Could someone help me please? If you need any more information or file, ask me
I just installed OLS Web Server and LScache following the official openlitespeed.org guidelines, but the cache did not work for me. My stack is:
VPS -> CentOS 7 (Updated) -> OLS (1.4.41) -> MariaDB 10.1 -> PHP7.2 (lsphp72 lsphp72-common lsphp72-mysqlnd lsphp72-gd lsphp72-process lsphp72-mbstring lsphp72-xml lsphp72-mcrypt lsphp72-pdo lsphp72-imap lsphp72-soap lsphp72-bcmath lsphp72-intl lsphp72-json lsphp72-opcache) -> Wordpress 5.0.2. I use the GeneratePress theme and I have the LiteSpeed Cache 2.9 plug-in installed.
I have correctly configured the external app and script handler to have php 7.2. I have also configured the virtual host and listerner well. Wordpress works correctly.
But for some reason that I do not know, the cache is not working. In the response headers there is 'X-LiteSpeed-Cache-Control: public, max-age: 604800' and 'X-LiteSpeed-Tag: 2271_PGSRP, 2271_home, 2271_URL.6666cd76f96956469e7be39d750cc7d9,2271_F, 2271_'. But does not appear 'X-LiteSpeed-Cache: miss / hit'.
'Cache-control: no-cache' and 'Pragma: no-cache' appear in the request headers.
'Cache.so' appear in /lsws/modules/ and in /lsws/cachedata/ appear '0'. In server configuration -> modules -> I have configured the cache module with these parameters
----------------------------------
enableCache 0
qsCache 1
reqCookieCache 1
respCookieCache 1
ignoreReqCacheCtrl 1
ignoreRespCacheCtrl 0
enablePrivateCache 0
privateExpireInSeconds 1000
expireInSeconds 1000
storagePath cachedata
checkPrivateCache 1
checkPublicCache 1
----------------------------------
In virtual host -> rewrite > i have configured these parameters:
----------------------------------
Enable Rewrite: Yes
Auto Load from .htaccess: No
Rewrite Rules: rewriteFile /usr/local/lsws/TyV/html/.htaccess
----------------------------------
The cache is enabled in the plug-in LSCache 2.9, and in wp-config-php it is set define('WP_CACHE', 'true').
The .htaccess file contains:
--------------------------------------------------------------------------------------------
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker LOGIN COOKIE start ###
RewriteRule .? - [E="Cache-Vary:wp-postpass_f6ca0217b63d378f392aa75ac5d443e5"]
### marker LOGIN COOKIE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
--------------------------------------------------------------------------------------------
I have been testing different configurations and I have given permission 777 the entire folder /lsws/ and their children, but the cache does not work. Could someone help me please? If you need any more information or file, ask me