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-shared [2016/08/16 21:45]
Rob Holda [Set Virtual Host level cache root for a single VHost]
litespeed_wiki:cache:common_installation:plesk-shared [2016/08/19 19:18] (current)
Jackson Zhang [Web Cache Web Server Configuration - Plesk Multi-Site/Shared Hosting]
Line 2: Line 2:
 This guide assumes that you have command-line access to the Plesk Server in question. If you do not have command-line access, please refer to Plesk'​s documentation on [[http://​docs.plesk.com/​en-US/​12.5/​advanced-administration-guide-linux/​virtual-hosts-configuration/​virtual-hosts-and-hosting-types/​virtual-host-configuration-files.72064/​ |editing Apache configuration files]] through the Plesk GUI. This guide assumes that you have command-line access to the Plesk Server in question. If you do not have command-line access, please refer to Plesk'​s documentation on [[http://​docs.plesk.com/​en-US/​12.5/​advanced-administration-guide-linux/​virtual-hosts-configuration/​virtual-hosts-and-hosting-types/​virtual-host-configuration-files.72064/​ |editing Apache configuration files]] through the Plesk GUI.
  
 +Simply run the following script, which will set server level and virtual host level cache roots and cache policies:
 +
 +  bash <(curl http://​www.litespeedtech.com/​packages/​lscache/​set_cache_root_policy.sh)
 +
 +Please bear in mind that the script doesn'​t enable the cache lookup for user, you can add cache lookup directive to .htaccess for any particular user manually. Out WordPress Cache Management tool for Plesk can manage the bulk enabling and disabling as you want and it is currently under development.
 +
 +  <​IfModule LiteSpeed>​
 +    CacheLookup public on
 +  </​IfModule>​
 +
 +The following wiki explain steps in details to set cache root and cache policy manually, though there is no such need if the above script has been run already.
 ===== Cache Storage Settings ===== ===== Cache Storage Settings =====
 ==== Set Server level cache root ==== ==== Set Server level cache root ====
Line 48: Line 59:
  
 ==== Set Virtual Host level cache root for a single VHost ==== ==== Set Virtual Host level cache root for a single VHost ====
-Create a file called ''​vhost.conf''​ if it does not already exist ( or "vhost_ssl.conf" ​for HTTPS sites) with the following content in the ''/​var/​www/​vhosts/​system/<​domain_name>/​conf/''​ directory:+Create a file called ''​vhost.conf''​ if it does not already exist ( or ''​vhost_ssl.conf'' ​for HTTPS sites) with the following content in the ''/​var/​www/​vhosts/​system/<​domain_name>/​conf/''​ directory:
  
 <​code>​ <​code>​
Line 65: Line 76:
  
 ===== Perform A Graceful Restart ===== ===== Perform A Graceful Restart =====
-After applying above cache storage settings, perform a graceful restart of LiteSpeed ​web server ​to have these changes take effect. LiteSpeed ​web server ​will automatically create the cache root directory with proper permission. ​User doesn't need to manually create any cache root directory.+After applying ​the above cache storage settings, perform a graceful restart of LiteSpeed ​Web Server ​to have these changes take effect. LiteSpeed ​Web Server ​will automatically create the cache root directory with proper permission. ​Users don't need to manually create any cache root directories themselves.
  
 <​code>​ <​code>​
Line 73: Line 84:
  
 ===== 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".+LiteSpeed Cache default 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 89: Line 100:
   Private Cache Expire Time (seconds):​Not Set   Private Cache Expire Time (seconds):​Not Set
  
-Add the following Apache style configuration directive in your application level .htaccess file 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>​
  • Admin
  • Last modified: 2016/08/16 21:45
  • by Rob Holda