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:lslb:context_proxy [2018/11/13 15:29]
qtwrk [Step 3:]
litespeed_wiki:lslb:context_proxy [2021/01/11 21:12] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-=======LiteSpeed ADC proxy on context level.======= +~~REDIRECT>​https://​docs.litespeedtech.com/​products/lsadc/moresettings/~~
- +
-=====Requirement:​===== +
- +
-LiteSpeed ADC on load balancer server , 2 web servers. +
- +
-Use case exmaple: +
- +
-A very heavy site that user wants to separate front-end and back-end. +
- +
-Front-end: https://​test.litespeedtech.com/ ​ , back-end: https://​test.litespeedtech.com/​admin-panel/​ +
- +
-The goal is: +
- +
-  user to https://​test.litespeedtech.com ---LiteSpeed ADC ---> front-end server +
-  user to https://test.litespeedtech.com/​admin-panel---> LiteSpeed ADC ---> back-end server +
- +
-Both ends should use same database server and network file system. +
- +
-====Step 1:==== +
- +
-Make sure both server are set up correctly , use local host file to bypass DNS for testing purpose. +
- +
-  [root@test ~]# curl http://test.litespeedtech.com +
-  Hello World from front-end server +
-  [root@test ​~]# vi /​etc/​hosts +
-  [root@test ​~]# curl http://​test.litespeedtech.com/​admin-panel/​ +
-  Hello World from back-end server +
-  [root@test ~]# +
- +
- +
-====Step 2:==== +
- +
-Create 2 clusters in ADC webadmin console. +
- +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-1.png|}} +
- +
-In this example they are named as ''​front-end''​ and ''​back-end''​ +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-2.png|}} +
- +
-And then add worker +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-3.png|}} +
- +
-Type choose HTTP or HTTPS , so is corresponding port to be 80 or 443.  this port can be any other port as long as it works with HTTP or HTTPS, and add IP in node list. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-4.png|}} +
- +
-After front-end cluster, same process for back-end cluster. +
- +
-====Step 3:==== +
- +
-After 2 clusters are created , now create a virtual host, since only **/​admin-panel/​** is going to be proxied to back-end , so main cluster for this domain is front-end +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-5.png|}} +
- +
-Now create a context. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-6.png|}} +
- +
-Set URI to **/​admin-panel/​** , please attach **/** at end , so every URI inside it will also be proxied, and choose **back-end** cluster. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-7.png|}} +
- +
-====Step 4:==== +
- +
-Now create listener and add domain into it. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-8.png|}} +
- +
-====Step 5:==== +
- +
-Save and restart ADC, and check the result +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-9.png|}} +
- +
-And access to **/​admin-panel/​** +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-10.png|}}+
  • Admin
  • Last modified: 2018/11/13 15:29
  • by qtwrk