OpenLiteSpeed lscache plugin and storage path question

itcms

Verified User
Joined
Jul 4, 2019
Messages
112
Location
Athens
Hi,

I have installed openlitespeed
According to the guide need to install separate the plugin

https://docs.litespeedtech.com/lsws/cp/directadmin/configuration/ its built in
but I see its working without that and store data under :
/usr/local/lsws/cachedata/priv/

My first question need or not plugin to be installed ?

Second question how to setup cache in separate disk ?

I created

Set Server-Level Cache Root
Add the following lines to the /etc/httpd/conf/extra/httpd-includes.conf file.

<IfModule Litespeed>
CacheRoot /mnt/dns1lscashe/cachedata #extra disk
</IfModule>


/usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre
Set Virtual-Host-Level Cache Root for all Virtual Hosts
Create a /usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre file

<IfModule Litespeed>
CacheRoot lscache
</IfModule>

Apply these changes to all Virtual Hosts by running the following command:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

but remains to cache under /usr/local/lsws/cachedata/priv/

There is any way to change that

I just need to have cache in dedicate extra disk only for this scope
 
Last edited:
Hi,

Thanks a lot
Its clear to me now
No need plugin
No need those modifications :

Set Server-Level Cache Root
Add the following lines to the /etc/httpd/conf/extra/httpd-includes.conf file.

<IfModule Litespeed>
CacheRoot /mnt/dns1lscashe/cachedata #extra disk
</IfModule>


/usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre
Set Virtual-Host-Level Cache Root for all Virtual Hosts
Create a /usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre file

<IfModule Litespeed>
CacheRoot lscache
</IfModule>

Last but not least where I can find in configuration files the storage path setting to change ?
 
Hello,

/usr/local/directadmin/data/templates/custom/cust_httpd.CUSTOM.2.pre

DirectAdmin uses diefferent templates for OpenLiteSpeed:
  • openlitespeed_context_protected.conf
  • openlitespeed_ips.conf
  • openlitespeed_listener.conf
  • openlitespeed_redirect_vhost.conf
  • openlitespeed_vhost.conf
And custom POST/PRE templates will have other names as well, e.g.:
  • /usr/local/directadmin/data/templates/custom/cust_openlitespeed.CUSTOM.1.pre
And configs will be located under /usr/local/lsws/conf/

More reading: https://docs.directadmin.com/webser...ustomizing-ols.html#customizing-openlitespeed

p.s. That's up to you to identify how to change the cache path and the way on how to customize it. If it's hardcoded, you can always use symlinks for /usr/local/lsws/cachedata/priv/
 
Back
Top