Differences
This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
litespeed_wiki:lslb:advanced-proxy [2020/01/09 21:05] qtwrk created |
litespeed_wiki:lslb:advanced-proxy [2020/01/14 03:35] Joshua Reynolds First round of proofreading |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== LiteSpeed ADC Advanced Reverse Proxy Usage ====== | ====== LiteSpeed ADC Advanced Reverse Proxy Usage ====== | ||
- | In previous [[litespeed_wiki:lslb:basic_config|basic configuration wiki]] it explains how to set up a basic reverse proxy, but in that case the request URI needed to be the same in the frontend as the backend, otherwise a 404 Not Found Error would be returned. | + | In the [[litespeed_wiki:lslb:basic_config|basic configuration article]] it explains how to set up a simple reverse proxy, but in that case the request URI would need to be the same in the frontend as the backend, otherwise a 404 Not Found Error would be returned. |
- | In this guide we will give examples for more advanced reverse proxy usage for two scenarios: proxy a frontend URI to different backend URI, or mask the URI. | + | Now in this guide we will give examples for more advanced reverse proxy usage for two scenarios: proxying a frontend URI to a different backend URI, or masking the URI. |
- | ===== Prepation ===== | + | ===== Preparation ===== |
- | We will use 3 test servers as example , each of them has domain | + | We will use 3 test servers as examples with the following domains: |
''adc.litespeed.dev'' | ''adc.litespeed.dev'' | ||
Line 16: | Line 16: | ||
''adc3.litespeed.dev'' | ''adc3.litespeed.dev'' | ||
- | respectively , and ''adc.litespeed.dev'' will be the main server and other two are served for different backend | + | Where ''adc.litespeed.dev'' will be the main server and other two are served for different backends. |
- | with each server, we create a php file with code: | + | With each server, we create a PHP file with code: |
Line 26: | Line 26: | ||
echo "HTTP_HOST: ".$_SERVER['HTTP_HOST']."<br>";</code> | echo "HTTP_HOST: ".$_SERVER['HTTP_HOST']."<br>";</code> | ||
- | This allows us to determine which backend and what file we are requesting with. | + | This allows us to determine which backend and what file we are requesting with: |
{{:litespeed_wiki:lslb:adc-adv-proxy-1.jpg|}} | {{:litespeed_wiki:lslb:adc-adv-proxy-1.jpg|}} | ||
- | We have also created 3 cluster backend to match each domain to its real IP, because ADC will redirect/proxy the request to cluster worker to do the proxy. | + | We have also created 3 cluster backends that match each domain to its real IP, because ADC will redirect/proxy the request to cluster worker to do the proxy: |
{{:litespeed_wiki:lslb:adc-adv-proxy-2.jpg|}} | {{:litespeed_wiki:lslb:adc-adv-proxy-2.jpg|}} |