Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:cache:common_installation:cpanel-single [2016/05/03 14:31] Michael Alegre [LSCache] |
litespeed_wiki:cache:common_installation:cpanel-single [2016/07/25 14:37] Long Hu [Set Server level cache root] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Web Cache Web Server Settings - cPanel Single Site ====== | + | ====== Web Cache Web Server Configuration - cPanel/WHM Single Site ====== |
+ | ===== Cache Storage Settings ===== | ||
+ | |||
+ | ==== Set Server level cache root ==== | ||
+ | Create a file named "lscache.conf" with the following content in directory ''/usr/local/apache/conf/includes/'': | ||
- | ==== Cache Storage Settings ==== | ||
- | == Set Server level of cache root == | ||
- | Using an Apache configuration file, the server level cache root is set by adding the following to your server level Apache config file: | ||
<IfModule Litespeed> | <IfModule Litespeed> | ||
- | CacheRoot /tmp/lscache | + | CacheRoot /home/lscache/ |
</IfModule> | </IfModule> | ||
| | ||
- | **Note:** make sure /tmp/lscache exists and server readable/writeable (nobody:nobody for cPanel). CacheRoot is an absolute path for server level setting. | + | **Note:** It is recommended to set the server level cache root to ''/home/lscache/'' or a disk partition with enough space. Server level cache root will only be used when vhosts cache root not set. |
- | + | ||
+ | Then | ||
+ | cat /usr/local/apache/conf/includes/lscache.conf >> /usr/local/apache/conf/includes/pre_main_global.conf | ||
+ | |||
+ | ===== Perform A Graceful Restart ===== | ||
+ | After applying your cache storage settings, perform a graceful restart of LiteSpeed web server to have these changes take effect. | ||
+ | |||
+ | <code> | ||
+ | service lsws restart | ||
+ | </code> | ||
+ | ===== Cache Policy Settings ===== | ||
+ | |||
+ | Add the following Apache style configuration directive in .htaccess to enable cache lookup. | ||
+ | |||
+ | <IfModule LiteSpeed> | ||
+ | CacheLookup public on | ||
+ | </IfModule> | ||
+ | ===== Advanced Cache Configuration ===== | ||
+ | For Advanced Cache Configuration info, **[[litespeed_wiki:cache:common_installation:advanced|look here]]**. |