Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:common_installation:plesk-single [2016/05/31 13:48]
Michael Alegre [Set Server level cache root]
litespeed_wiki:cache:common_installation:plesk-single [2016/07/25 15:55] (current)
Long Hu [Set Server level cache root]
Line 3: Line 3:
 ===== Cache Storage Settings ===== ===== Cache Storage Settings =====
 ==== Set Server level cache root ==== ==== Set Server level cache root ====
-The server level cache root is set by adding ​the following ​to your server level Apache config file+Create a file named "​lscache.conf"​ with the following ​content in directory ''/​etc/​httpd/​conf.d/''​
-  <​IfModule Litespeed>​ +<​code>​ 
-  CacheRoot /home/lscache/ +<​IfModule Litespeed>​ 
-  </​IfModule>​+  CacheRoot /var/​www/​vhosts/lscache/ 
 +</​IfModule
 +</code>
   ​   ​
-**Note:​** ​make sure ''/​home/​lscache/'' ​exists and server readable/​writeable (''​apache:​apache''​ for Plesk). CacheRoot is an absolute path for server level setting.+**Note:​** ​It is recommended to set the server level **Cache Root** to ''/​var/​www/​vhosts/​lscache/'' ​or a disk partition with enough space.
  
 +
 +===== 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>​
 +
 +
 +**Note**: User doesn'​t need to manually create any cache root directory, lsws will automatically create the cache root directory with proper permission. ​
 ===== Cache Policy Settings =====  ===== Cache Policy Settings ===== 
 +LiteSpeed Cache default settings work well with most caching scenarios. For shared hosting environment,​ please don't change any of the **Server Level** default cache policy settings and leave them as "Not Set".
 +  Cache Policy:
 +  Enable Public Cache:Not Set
 +  Check Public Cache:Not Set
 +  Max Object Size:Not Set
 +  Cache Expire Time (seconds):​Not Set
 +  Cache Stale Age (seconds)Not Set
 +  Cache Request with Query String:Not Set
 +  Cache Request with Cookie:Not Set
 +  Cache Response with Cookie:Not Set
 +  Ignore Request Cache-Control:​Not Set
 +  Ignore Response Cache-Control:​Not Set
 +  Enable Private Cache:Not Set
 +  Check Private Cache:Not Set
 +  Private Cache Expire Time (seconds):​Not Set
  
-Add the following Apache style configuration directive in .htaccess to enable cache lookup.+Add the following Apache style configuration directive in your application level .htaccess ​file to enable cache lookup.
  
   <​IfModule LiteSpeed>​   <​IfModule LiteSpeed>​
      ​CacheLookup public on      ​CacheLookup public on
   </​IfModule>​   </​IfModule>​
- 
- ​Perform a web server graceful restart. 
- 
 ===== Advanced Cache Configuration ===== ===== Advanced Cache Configuration =====
 For Advanced Cache Configuration info, **[[litespeed_wiki:​cache:​common_installation:​advanced|look here]]**. For Advanced Cache Configuration info, **[[litespeed_wiki:​cache:​common_installation:​advanced|look here]]**.
  • Admin
  • Last modified: 2016/05/31 13:48
  • by Michael Alegre