This is an old revision of the document!
LiteSpeed Web Server as a Proxy
The purpose of a Proxy is to expand on functionality and add an extra layer of security.
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?
- First the client sends a request to LiteSpeed Web Server.
- LSWS then forwards that request to the backend server.
- The backend server will then send a response back to LSWS.
- Finally, LSWS responds back to the Client acting as if there was no backend server.
How to set up the server as a proxy
- Log in to the LSWS GUI. The default address is http://IP:7080
- Go to Configuration → Virtual Hosts and click on the Virtual Host that is going to be used as the proxy.
- In the Virtual Host configuration, go to the External App tab and hit Add.
- Select Web Server from the drop down list.
- On the following page, fill in the following and hit Save:
- Name - Any unique external app name.
- Address - The IP:PORT or UDS socket of the backend server.
- Max Connections - The maximum number of concurrent connections to this Web Server at any time.
- Initial Request Timeout (secs) - The maximum time in seconds the server will wait for a response.
- Retry Timeout (secs) - The period of time that the server waits before retrying a request.
- After saving, go to the Context Tab and hit Add.
- Select Proxy from the drop down list.
- Fill in the following and hit Save:
- URI - How users will access the web server. Example: /br/
- Note: If a value other than ‘/’ is used, be sure that this directory also exists and is accessible on the backend web server.
- Web Server - Be sure to select the one that was just created.
- Once all of the previous steps have been completed, perform a Graceful Restart to have the changes take affect.
The URL for vhost/context should now act as a proxy from the External App Web Server that was just set up.