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 16:01]
Lisa Clarke Proofreading and Rewording
litespeed_wiki:lslb:context_proxy [2021/01/11 21:12] (current)
Lisa Clarke Redirect to new Documentation Site
Line 1: Line 1:
-====== Setting up a Proxy on the LiteSpeed Web ADC Context Level ====== +~~REDIRECT>​https://​docs.litespeedtech.com/products/lsadc/moresettings/~~
- +
-===== Requirements ===== +
- +
-  * LiteSpeed Web ADC on a load balancer server +
-  * Two web servers. +
- +
-===== Use Case Example ===== +
- +
-You have a very heavy site, and so you want to lighten the load by hosting the front-end and back-end on different servers. +
- +
-  * Front-end: ''<​nowiki>​https://​test.example.com/</nowiki>''​ +
-  * Back-end: ''<​nowiki>​https:​//test.example.com/​admin-panel/</​nowiki>''​ +
- +
-The goal is: +
- +
-  * user requests ''<​nowiki>​https://​test.example.com</​nowiki>''​ ---> LiteSpeed ADC ---> front-end server +
-  * user requests ''<​nowiki>​https://​test.example.com/​admin-panel/</​nowiki>''​ ---> LiteSpeed ADC ---> back-end server +
- +
-Both ends should use same database server and network file system. +
- +
-===== Configuration ===== +
- +
-====Step 1==== +
- +
-Make sure both servers are set up correctly. Use local host file to bypass DNS for testing purposes. +
- +
-  [root@test ​~]# curl http://​test.example.com +
-  Hello World from front-end server +
-  [root@test ​~]# vi /​etc/​hosts +
-  [root@test ~]# curl http://​test.example.com/​admin-panel/​ +
-  Hello World from back-end server +
-  [root@test ~]# +
- +
-====Step 2==== +
- +
-Create two clusters in ADC WebAdmin console. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-1.png|}} +
- +
-In this example they are named ''​front-end''​ and ''​back-end''​. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-2.png|}} +
- +
-Add a worker for each cluster. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-3.png|}} +
- +
-For **Type**, choose ''​HTTP''​ or ''​HTTPS'',​ and the corresponding port will be set to 80 or 443, respectively. You can override the port numbers, as long as your choice works with HTTP or HTTPS as needed. +
- +
-Add the IP address to **Node Address List**. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-4.png|}} +
- +
-====Step 3==== +
- +
-After the two clusters are created, add a new virtual host. Only ''/​admin-panel/''​ is going to be proxied to ''​back-end'',​ so the **Default Cluster** for this domain is ''​front-end''​. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-5.png|}} +
- +
-Create a context. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-6.png|}} +
- +
-Set **URI** to ''/​admin-panel/'',​ making sure to include the ''/''​ at the end. This ensures so every URI in that path will also be proxied. +
- +
-Set **Cluster** to ''​back-end''​. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-7.png|}} +
- +
-====Step 4==== +
- +
-Create a listener and add the ''​test.example.com''​ domain to it. +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-8.png|}} +
- +
-====Step 5:==== +
- +
-Save and restart the ADC, and check the results. +
- +
-Visit ''​test.example.com'':​ +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-9.png|}} +
- +
-Visit ''​test.example.com/​admin-panel/'':​ +
- +
-{{:​litespeed_wiki:​lslb:​adc-context-10.png|}}+
  • Admin
  • Last modified: 2018/11/13 16:01
  • by Lisa Clarke