LiteSpeed Web Server as a Proxy

The purpose of a Proxy is to expand on functionality and add an extra layer of security. LiteSpeed 5.x and earlier version doesn't support ProxyPass, ProxyPassReverse or other Apache mod_proxy directives. However, you can use a few methods to achieve the same goal on LSWS. Unless the proxy is on the same server, most of time you will need to manually set up an extra app for the proxy first, then use rewrite rules with [P], or a context to make the proxy work.

Please note: As of LSWS v5.3.6, there is support for ProxyPass and ProxyPassMatch for an AJP backend, but not for a non-AJP backend.

Staring from 6.x, ProxyPass and ProxyAddHeaders is supported.

This wiki explains how to set up LiteSpeed Web Server (LSWS) as a Proxy. This makes it possible to transform a URL that is usually just an IP and Port into a Fully Qualified Domain Name.

How Does LSWS Act as a Proxy and Handle Client Requests Meant for a Backend Server?

  1. The client sends a request to LiteSpeed Web Server.
  2. LSWS forwards that request to the backend server.
  3. The backend server sends a response back to LSWS.
  4. LSWS responds back to the Client acting as if there was no backend server.

Control Panel Environment

How to setup Mod_Proxy like proxy on LSWSConfiguring LSWS + Apache Mod_Proxy in a Control Panel Environment

LSWS Native Configuration as reverse proxy

You can setup LSWS as a reverse proxy if you want. You can either set it up through LSWS Native virtual host contexts or rewrite rules. You can also setup LSWS as a load balancer.

Web Proxy as a ContextConfiguring LiteSpeed Web Server as a Proxy via Contexts
Web Proxy as a RewriteRule in Native LSWSConfiguring a native LiteSpeed Web Server installation as a Proxy via Rewrite Rules
How to Set up LSWS as a Load BalancerUsing a series of servers for load balancing
WebSocket ProxyConfiguring LiteSpeed Web Server as a WebSocket Proxy
  • Admin
  • Last modified: 2021/08/09 14:03
  • by Jackson Zhang