Hi, this guide will show you how to setup OpenLiteSpeed as reverse proxy server.
In this example , I will use backend.cyberpanel.net as back-end , and reverse.cyberpanel.net as front-end.
1. First of all , test both domains are working


2. Now go to External App , create a new external app type "Web Server"


3. Let's call it "Backend" , this name will be used in later step.
In this case , it's same machine , so it is 127.0.0.1 , if it's different server , you can set public IP , if backend is HTTPS , remember add https://

4. Now create a context, type "Proxy", set URI to /



5. Since it's different domain , you also have to pass hostname for backend to accept request.

RewriteRule ^/(.*)$ http://backend/$1 [P,E=Proxy-Host:backend.cyberpanel.net]
note: backend is the name you created in step 3, and backend.cyberpanel.net is our back-end domain.
6. Now let's restart OpenLiteSpeed and test it.
Comments
but it looks like a new domain like panel.mydomain.com not subdomain right?
okay i have a domain abc.com
now i want to use cyberpanel as subdomain like panel.abc.com which is SSL. what can i do? can you give step by steps?
and next i wanna use mail, forum, ftp as subdomain like mail.abc.com. how can i config like panel as subdomain.
2 Issue ssl
3 Access ssh (putty)
4 Open /usr/local/lsws/conf/httpd_config.conf
Paste the following
extprocessor cyberpanel {
type proxy
address https://panel.abc.com:8090
maxConns 100
pcKeepAliveTimeout 60
initTimeout 60
retryTimeout 0
respBuffer 0
}
4. Add rewrite rules
REWRITERULE ^(.*)$ HTTP://cyberpanel/$1 [P]
https://openlitespeed.org/mediawiki/index.php/Use_OpenLiteSpeed_as_Load_Balancer
In this case where SSL will install?
On apache or openlitespeed ?
otherwise , on OLS , as it faces in front
(98)Address already in use: AH00072: make_sock: could not bind to address [::]:82
I checked many times this port is not in use but still error comping and apache not starting.
Tried putting
sudo setenforce 0
But no luck.
if you server doesn't have ipv6 , then you need to comment out ipv6 bind
I have hosted multiple domains on the same OpenLiteSpeed server using CyberPanel
Let's say I have hosted one.abc.com and two.abc.com using CyberPanel. If relevant, my server hostname is panel.abc.com.
Now, I want to use one.abc.com as reverse proxy for one.xyz.com.
And, two.abc.com as reverse proxy for two.xyz.com.
If it can be done then can you please tell me how I can do this?