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:apache-config-shared [2016/08/17 12:54]
Rob Holda [Set virtual host level cache root]
litespeed_wiki:cache:common_installation:apache-config-shared [2016/09/30 13:42] (current)
Jackson Zhang [Advanced Cache Configuration]
Line 12: Line 12:
 The vhost level cache root is normally a per user cache root set to a subdirectory under a user's home directory. ​ The vhost level cache root is normally a per user cache root set to a subdirectory 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+If using a virtual host include file (as opposed to ''​.htaccess''​) a relative path can be used for "​CacheRoot"​ such as
  
   <​IfModule LiteSpeed>​   <​IfModule LiteSpeed>​
Line 18: Line 18:
   </​IfModule>​   </​IfModule>​
  
-If it does not exist, the cache directory will be created automatically by LiteSpeed Web Server during startup as "lscache" ​under the user's home directory. ​+If it does not exist, the cache directory will be created automatically by LiteSpeed Web Server during startup as ''​lscache'' ​under the user's home directory. ​
  
 **Notes:** If different vhosts share the same document root, these vhosts have to share the same vhost level cache root directory. **Notes:** If different vhosts share the same document root, these vhosts have to share the same vhost level cache root directory.
 +
 ===== 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".+The default ​LiteSpeed Cache settings work well with most caching scenarios. ​If you're configuring a shared hosting environment,​ don't change any of the **Server Level** default cache policy settings. Leave them as ''​Not Set''​. 
   Cache Policy:   Cache Policy:
   Enable Public Cache:Not Set   Enable Public Cache:Not Set
Line 39: Line 41:
   Private Cache Expire Time (seconds):​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 ​to ''​.htaccess''​ file of a specific WordPress installation ​to enable cache lookup.
  
   <​IfModule LiteSpeed>​   <​IfModule LiteSpeed>​
Line 45: Line 47:
   </​IfModule>​   </​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. 
  
 +**Note:​** ​
 +  * **"​Enable Public Cache"​** should always be "Not Set" or "​No"​ unless you want to enable cache globally, which is definitely not recommended.
 +  * **Check Public Cache** better set to "Not Set" but should never be "​No"​ otherwise it will turn off the cache lookup and LScache won't work. 
 +===== Restart LSWS =====
 +Please perform a graceful restart of LiteSpeed Web Server after any configuration change to the server.
  
 ===== 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/08/17 12:54
  • by Rob Holda