Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
litespeed_wiki:cache:no-plugin-concrete5 [2018/07/11 10:04]
Tihomir [Verify Cache Setup]
litespeed_wiki:cache:no-plugin-concrete5 [2018/07/11 14:29]
Lisa Clarke Proofreading and Additional Content
Line 1: Line 1:
 ====== LSCache + Concrete5 ====== ====== LSCache + Concrete5 ======
- 
 LSCache, similar to Varnish cache, is a simpler and more efficient page caching solution built-in to LiteSpeed Web Server. When used in conjunction with Concrete5, you can expect significant performance gains with a quick and easy setup. Cache management is also made significantly easier and more flexible. LSCache, similar to Varnish cache, is a simpler and more efficient page caching solution built-in to LiteSpeed Web Server. When used in conjunction with Concrete5, you can expect significant performance gains with a quick and easy setup. Cache management is also made significantly easier and more flexible.
  
-Below are some recommended configurations to enable LSCache and get it working with your Concrete5+Below are some recommended configurations to enable LSCache and get it working with your Concrete5 ​installation.
  
 ===== Configure Server/​Virtual Host Level Cache Root And Cache Policy ===== ===== Configure Server/​Virtual Host Level Cache Root And Cache Policy =====
  
-Server/​VirtualHost level cache storage needs to be configured properly for your environment. Select your server setup from the **Web Server Configuration** section of our **[[litespeed_wiki:​cache:​common_installation#​web_server_configuration|LiteSpeed Cache Installation Guide]]** and follow the instructions to set the server/​virtual host level cache root and cache policy.+Server/​VirtualHost level cache storage needs to be configured properly for your environment. Select your server setup from the **Web Server Configuration** section of our [[litespeed_wiki:​cache:​common_installation#​web_server_configuration|LiteSpeed Cache Installation Guide]] and follow the instructions to set the server/​virtual host level cache root and cache policy.
  
 ===== Requirements ===== ===== Requirements =====
 +Install Concrete5 on a domain or a subdomain, and then create a new admin subdomain. Both domains must use the same document root.
  
-You will need to have installed ​Concrete5 ​on a domain or subdomainAfter that create new subdomain. The document root for that new subdomain need to be the same as the main domain nameYou will use the new subdomain to administrate your page as he will be not cached. That way you will avoid problems with the cache.+==== Why? ==== 
 +Caching a Concrete5 ​site can be tricky, because there is no admin directoryAs such, when you cache the site for visitors, //you are also caching it for admin functions and development//​This is not ideal.
  
-For example:+One solution is to define a subdomain that you can use when you want to do administrative tasks. Configure the subdomain to use the same document root as the main site's domain (i.e. ''​public_html''​),​ and then exclude it from caching in ''​.htaccess''​. This essentially gives you two different ways of accessing the exact same site. To view the cached content, you would access the site at ''<​nowiki>​www.domain.com</​nowiki>'',​ and to do admin work, you would access the uncached content at ''<​nowiki>​admin.domain.com</​nowiki>''​. They point to the same location, except one is cached and one is not.
  
-If you install Concrete5 for domain.com and it is loading from the directory **public_html**,​ the subdomain admin.domain.com need to load from **the same public_html** directory.+For more about this concept, please see [[https://​www.madesimplemedia.co.uk/​blog/​run-litespeed-cache-with-concrete5|the blog post by madesimplemedia]].
  
 ===== Rewrite rules ===== ===== Rewrite rules =====
- 
 Activate cache for the main domain with: Activate cache for the main domain with:
  
Line 27: Line 27:
 RewriteRule .* - [E=Cache-Control:​max-age=120]</​code>​ RewriteRule .* - [E=Cache-Control:​max-age=120]</​code>​
  
-After that exclude the subdomain that we will use for administration with: +After thatexclude the subdomain that we will use for administration with:
 <​code>​RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ <​code>​RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
 RewriteCond %{HTTP_HOST} ^admin.domain.com$ [NC] RewriteCond %{HTTP_HOST} ^admin.domain.com$ [NC]
Line 34: Line 33:
  
 ===== Verify Cache Setup ===== ===== Verify Cache Setup =====
- +Please ​make sure you can see the ''​X-LiteSpeed-Cache:​ hit''​ header ​by following [[litespeed_wiki:​cache:​no-plugin-setup-guidline#​verify_that_pages_are_served_from_the_cache|this wiki]]. Note that you will see cache hit only for the main domain as the admin subdomain is excluded.
-Please ​verify to see if you can see "X-LiteSpeed-Cache:​ hit" ​by following [[litespeed_wiki:​cache:​no-plugin-setup-guidline#​verify_that_pages_are_served_from_the_cache|this wiki]]. Note that you will see cache hit only for the main domain as the admin subdomain is exclude.+
  
 ===== Deleting Outdated Cache Files Using A Cron Job ===== ===== Deleting Outdated Cache Files Using A Cron Job =====
- 
 Please refer to [[litespeed_wiki:​cache:​no-plugin-setup-guidline#​deleting_outdated_cache_files_using_a_cron_job|this wiki]]. Please refer to [[litespeed_wiki:​cache:​no-plugin-setup-guidline#​deleting_outdated_cache_files_using_a_cron_job|this wiki]].
  
 ===== Notes ===== ===== Notes =====
- +  ​Because of the way you set up the main domain and admin domain, it is better ​for SEO if you disable ​Google and other robots from indexing the admin domain. Otherwise, ​your SEO will be penalized because of duplicate content
-For the SEO is better ​to disable ​google or other robot to index your subdomain+  * If you have problems ​accessing ​the subdomain, please check the code in your ''​.htaccess'' ​file.
- +
-* If you have problems ​to open the subdomain, please check the code in your htaccess file.+
  • Admin
  • Last modified: 2020/09/17 19:50
  • by Lisa Clarke