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 Both sides next revision
litespeed_wiki:proxy:lsws-as-a-proxy-rewrite [2019/06/05 14:53]
Jackson Zhang [How to set up the server as a proxy via rewrite rules through .htaccess]
litespeed_wiki:proxy:lsws-as-a-proxy-rewrite [2019/06/05 18:39]
Jackson Zhang [Example 3: Proxy to a site on the same server]
Line 55: Line 55:
  ​RewriteRule ^(.*)$ https://​127.0.0.1:​5000/​$1 [P,L]  ​RewriteRule ^(.*)$ https://​127.0.0.1:​5000/​$1 [P,L]
 </​code>​ </​code>​
 +
 +==== Example 4: cpanel webmail like proxy ====
 +A user using Apache without control panel but he wants to achieve the same that is in cPanel for www.domain.com/​webmail:​ when anyone accesses webmail at www.domain.com/​webmail it will load one installation that loads at http://​127.0.0.1/​rainloop/​.
 +
 +With Apache we achieved it with the ''​ProxyPass'':​
 +  ProxyPass "/​webmail/"​ "​http://​127.0.0.1/​rainloop/"​
 +
 +but LiteSpeed doesn'​t support ''​ProxyPass''​ in this case. What exactly does the user need to do to achieve it with LiteSpeed? Actually using the following rewrite rule in the virtual host apache configuration should just work without creating external app on LSWS configuration:​
 +
 +  RewriteRule /​webmail/​(.*) http://​127.0.0.1/​rainloop/​$1 [P]
 +
 +
 +
 ===== Testing ===== ===== Testing =====
 From the browser, ​ From the browser, ​
  • Admin
  • Last modified: 2021/08/09 14:00
  • by Jackson Zhang