How do I proxy traffic to a different server?

#1
I am new to openlitespeed and web server management in general, so excuse the question if it is rather novice.

Current setup: example.com running on openlitespeed and app.example.com:8443 running on a completely separate server on the same network.

What I am trying to accomplish:
app.example.com goes to app.example.com:8443

I have read pages and pages of configuring openlitespeed as a reverse proxy, setting up context rules, .htaccess rewrites, etc. and I am lost on how I can accomplish this. Any help would be greatly appreciated, thanks!
 

Pong

Administrator
#2
There are different way to setup proxy, you can use rewrite rule way if you like.

You will need to create a virtual host on OLS for app.example.com, in that virtual host, create external app for ip:8443(please use ip instead of domain name with port), then use rewrite rule to rewrite everyting to backend proxy.

Let us know if the KB is not clear and where it is confused you and we can improve it.

https://openlitespeed.org/kb/revers...d_the_simplest_for_name-based_virtual_hosting
 
Last edited:
#3
I have a new virtual host setup for app.example.com. I added an external app to that called "APP" with the address of app.example.com:8443 (I am unable to use the IP in this case). Under rewrite rules I have:

Code:
ENABLE REWRITE: YES
REWRITE RULES:
REWRITERULE ^/(.*)$ HTTP://APP/$1 [P,E=PROXY-HOST:WWW.APP.EXAMPLE.COM]
Still can't seem to get it working with that. Thank you for your help thus far!
 

Pong

Administrator
#4
Last edited:
Top