Differences

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

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cache:mediawiki [2018/01/10 20:37]
Jackson Zhang [Install]
litespeed_wiki:cache:mediawiki [2018/03/06 15:28] (current)
Lisa Clarke Proofreading
Line 9: Line 9:
 ===== Prerequisites ===== ===== Prerequisites =====
  
-This version of LiteSpeedCache requires MediaWiki ​**1.25** or later and LiteSpeed Web Server (LSWS) ​**5.2.3** or later.+This version of LiteSpeedCache requires MediaWiki 1.25 or later and LiteSpeed Web Server (LSWS) 5.2.3 or later.
  
 ===== Download ===== ===== Download =====
  
-<​code>​wget https://​github.com/​litespeedtech/​lscache_mediawiki/​archive/​master.zip</​code>​+<​code>​wget ​<​nowiki>​https://​github.com/​litespeedtech/​lscache_mediawiki/​archive/​master.zip</​nowiki>​</​code>​
  
 Unzip the downloaded file with: Unzip the downloaded file with:
Line 22: Line 22:
 ===== Install ===== ===== Install =====
  
-1. Create ''​.htaccess''​ if it doesn'​t exist, and add the following: +  - Create ''​.htaccess''​ if it doesn'​t exist, and add the following: <​code><​IfModule LiteSpeed>​
- +
-<​code><​IfModule LiteSpeed>​+
 CacheLookup on CacheLookup on
 </​IfModule></​code>​ </​IfModule></​code>​
- +  - Move the ''​LiteSpeedCache''​ directory to ''/​extensions''​ in the MediaWiki directory 
-2. Move the ''​LiteSpeedCache''​ directory to ''/​extensions''​ in the MediaWiki directory +  ​- ​Edit ''​LocalSettings.php''​ in the MediaWiki root directory, and add the following near the end: <​code>​wfLoadExtension( '​LiteSpeedCache'​ );</​code>​ 
- +  - Log in to MediaWiki and from the administrator panel, navigate ​to '''​Special pages > Data and Tools > LiteSpeed Cache'''​.
-3. Edit ''​LocalSettings.php''​ in the MediaWiki root directory, and add the following near the end: +
- +
-<​code>​wfLoadExtension( '​LiteSpeedCache'​ );</​code>​ +
- +
-4. After you login to media wiki ''​special''​ page, under ''​Data and Tools''​,there is ''​LiteSpeed cache''​ setting like the following:+
 {{ :​litespeed_wiki:​cache:​mediawikicache3.png?​200 |}} {{ :​litespeed_wiki:​cache:​mediawikicache3.png?​200 |}}
- 
  
 {{ :​litespeed_wiki:​cache:​mediawikicache4.png?​200 |}} {{ :​litespeed_wiki:​cache:​mediawikicache4.png?​200 |}}
  
 +===== Settings =====
 +
 +Edit the page to enable public cache:
  
 {{ :​litespeed_wiki:​cache:​mediawikicache2.png?​800 |}} {{ :​litespeed_wiki:​cache:​mediawikicache2.png?​800 |}}
- 
-You should also turn public cache and private cache on there. The default settings are "​off"​. 
- 
-===== Settings ===== 
- 
-From the MediaWiki administrator panel navigate to **Special pages > LiteSpeed Cache**, and edit the page to enable public cache: 
  
 Set **LiteSpeed Public Cache Enabled** to ''​checked''​ and save the page. Set **LiteSpeed Public Cache Enabled** to ''​checked''​ and save the page.
Line 55: Line 44:
 If a resource is served from LSWS cache, the server response header contains ''​X-LiteSpeed-Cache:​ Hit''​. If a resource is served from LSWS cache, the server response header contains ''​X-LiteSpeed-Cache:​ Hit''​.
  
-Load the URL ''<​nowiki>​https://​yourdomain.com/​wiki/​index.php/​Main_Page</​nowiki>''​ and check the headers through **Network** tab of the developer tool. You should see something like this:+Load the URL ''<​nowiki>​https://​yourdomain.com/​wiki/​index.php/​Main_Page</​nowiki>''​ and check the headers through ​the **Network** tab of the brower'​s ​developer tool. You should see something like this:
  
-<​code>​GET /​wiki/​index.php/​Main_Page HTTP/1.1 +  ​GET /​wiki/​index.php/​Main_Page HTTP/1.1 
-Accept text/​html,​application/​xhtml+xml,​application/​xml;​q=0.9,​*/​*;​q=0.8 +  Accept text/​html,​application/​xhtml+xml,​application/​xml;​q=0.9,​*/​*;​q=0.8 
-Accept-Encoding gzip,​ deflate, br +  Accept-Encoding gzip,​ deflate, br 
-Accept-Language en-US,​en;​q=0.5 +  Accept-Language en-US,​en;​q=0.5 
-cache-control public,​ max-age=2592000 +  cache-control public,​ max-age=2592000 
-server LiteSpeed +  server LiteSpeed 
-vary Accept-Encoding,​ Cookie +  vary Accept-Encoding,​ Cookie 
-x-litespeed-cache hit</​code>​+  x-litespeed-cache hit
  
  • Admin
  • Last modified: 2018/03/06 15:28
  • by Lisa Clarke