This is an old revision of the document!


Web Cache Web Server Configuration - Apache Config (No Control Panel) Multi-Site

Set Server level cache root

Set a server level cache root by add the following to your server level Apache config file:

<IfModule Litespeed>
CacheRoot /tmp/lscache
</IfModule>

Note: make sure /tmp/lscache exists and server readable/writeable (nobody:nobody for cPanel). CacheRoot is an absolute path for server level setting

Set virtual host level cache root

The vhost host level cache root is normally a per user cache root set to a subfolder under a user's home directory.

If using a virtual host include file (as opposed to .htaccess) a relative path can be used for “CacheRoot” such as

<IfModule LiteSpeed>
  CacheRoot lscache
</IfModule>

The cache directory will be created automatically as “lscache” if not exists under user's home directory.

Add the following Apache style configuration directive in .htaccess to enable cache lookup.

<IfModule LiteSpeed>
   CacheLookup public on
</IfModule>

Perform a web server graceful restart.

Note: Shared hosting providers can selectively enable LSCache by setting Check Public Cache to “No” at the server level (Configuration»Server»Cache»Cache Policy) and then adding this directive in the .htaccess file of a specific WordPress installation. This will have the effect of turning on LSCache for only this site, allowing you to choose which sites have caching enabled.

Advanced Cache Configuration

For Advanced Cache Configuration info, look here.

  • Admin
  • Last modified: 2016/05/05 19:42
  • by Michael Alegre