Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Web Hosting  >  How to Use OpenLiteSpeed as a Reverse Proxy Server?

How to Use OpenLiteSpeed as a Reverse Proxy Server?

 2 min

OpenLiteSpeed accelerates the performance of reverse proxies by directing incoming HTTP/HTTPS traffic to a backend application server. Different steps that included creating a web server external app, setting up a virtual host, and defining proxy rules to forward traffic. This tutorial shows how to use OpenLiteSpeed as a reverse proxy:

We will be using backend.cyberpanel.net as the backend and reverse.cyberpanel.net as frontend as examples.

  1. First, check the domain responsiveness.
backend-image-one
frontend-image-one
  1. Then, create a new external app type “Web Server” by navigating to the External App option.
reverse-panel
web-server-name
  1. Enter the web server name. We labelled it as ‘Backend.’

As this is the same machine, it is 127.0.0.1, if it’s a different server, you can set a public IP, and if the backend is HTTPS, add https:// to the address.

backend-server-details
  1. Create a context, type “Proxy”, and set the URI to /
file-manager
proxy-server
vhost-server
  1. You also have to pass the backend’s hostname since it’s a different domain.
rewrite-name
RewriteRule ^/(.*)$ http://backend/$1 [P,E=Proxy-Host:backend.cyberpanel.net]`

Backend is the name you created in step 3, and backend.cyberpanel.net is our back-end URL.

  1. Let’s restart OpenLiteSpeed and test it.
final-image

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.