reserve proxy to other domain

str21

New Member
#1
hi, hope u have a great day
im new to this forum and also new to vps world, so i dont know much about this.
first, sorry if my english is not understandable because im not native speaker of english but i hope u know what im going to ask :):)
could you help to guide me how to do reverse proxy on openlitespeed ?

i only can find gambling site that doing this kind of reverse proxy, so im using this site as example here (if you can't open this site please use vpn location of indonesia)
i found someone can create reverse proxy with this IP

i've searching "how to reverse proxy litespeed" and i found some of the tutorial this site and this , but i cant still get it works ,
i still dont understand about [P,E=Proxy-Host:www.example.com]
and this kind of code
(RewriteCond %{HTTPS} !=on
REWRITERULE ^(.*)$ HTTP://apachehttp/$1 [P,L,E=PROXY-HOST:WWW.EXAMPLE1.COM]
RewriteRule ^(.*)$ HTTPS://apachehttps/$1 [P,L,E=PROXY-HOST:WWW.EXAMPLE1.COM])

i've tried to change "HTTP://apachehttp" with my dedicated ip address and "www.example1.com" with domain url i want to reverse .
also i dont know what should i fill in "proxy-host", i've changed it to domain url with no luck

lets say i have vps with IP 87.120.8.185 and i want make this ip to reserve proxy domain of wv88.online
how's the step ?

thank you ;)
 

Cold-Egg

Administrator
#2
Hi,
Please check https://openlitespeed.org/kb/reverse-proxy-basics/
To be clear, you want users to visit domain wv88.online on 87.120.8.185 right? not the IP.
In this case, you may want to create a Web Server External Application at the Server or Virtual Host level first, then follow "Method 3: Proxying with Rewrite Rules" which you are already using to set up.

"HTTP://apachehttp" will depend on the Web Server External Application you created. "www.example1.com" will be your site domain, wv88.online.
 

str21

New Member
#3
hi, thank you for replying , after follow the instruction link u provide, im still unable to make it work
here's my setting this far, and i get "404 error not found"
external app >> added webserver
Name : test
Address: http://87.120.8.185
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0

Virtual host >> added proxy-vhost

Virtual Host Name : proxy-vhost
Virtual Host Root : proxy/
Config File : $SERVER_ROOT/conf/vhosts/proxy-vhost/vhconf.conf
Follow symbolic link : no
Enable script/ext app : no
Max keep alive request : 1000
Restrained : yes

Virtual host >> rewrite
enable script : yes
rewrite rules :
RewriteCond %{HTTPS} !=on
REWRITERULE ^(.*)$ HTTP://test/$1 [P,L,E=PROXY-HOST:WWW.WAVE88.ME]
RewriteRule ^(.*)$ HTTPS://test/$1 [P,L,E=PROXY-HOST:WWW.WAVE88.ME]

Listener >> added test
Listener name : test
IP address : 87.120.8.185
port : 80
secure : no
in virtual mappings
virtualhost : proxy-vhost
domain : https//wave88.online

is there any config did i miss ?
 

Pong

Administrator
#4
What's your current OLS ip address?
Listener >> added test
Listener name : test
IP address : 87.120.8.185

If 87.120.8.185 is your backend site IP, not your server IP, you should use your rent server's IP. domain :https//wave88.online should be domain wave88.online.

at your proxy external app, address should be 87.120.8.185:80
 

str21

New Member
#5
What's your current OLS ip address?
Listener >> added test
Listener name : test
IP address : 87.120.8.185

If 87.120.8.185 is your backend site IP, not your server IP, you should use your rent server's IP. domain :https//wave88.online should be domain wave88.online.

at your proxy external app, address should be 87.120.8.185:80
i already added ":80" on external app but still cant make it works (404 not found also)
what u mean by "rent server's ip" ? the public ip of wave88.online ? if yes ,i dont know also because its cloudflare but on dns look up the A is pointed to 172.67.221.51 .

i know the owner of wave88.online ,and he tell me that the person who create link IP for him is only asking about what domain u want to be created with link IP , and that person telling him not to redirect the domain .
this site is whitelabel, so owner of wave88 also doesn't have access to root or control panel, he just provide domain with NS from them and colour, logo of website.
https://149.28.136.65/ this is the IP he created for wave88 btw

edit
Sorry , i was wrong about mentioning URL of the website , its wv88.online
 
Last edited:

Cold-Egg

Administrator
#6
Since your backend server IP is 149.28.136.65, you should use

Code:
external app >> added webserver
Name : test
Address: http://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
instead of
Code:
external app >> added webserver
Name : test
Address: http://87.120.8.185
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
And you might want to create two webservers for both HTTP and HTTPS.
So it will be

Code:
external app >> added webserver
Name : test
Address: http://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
and
Code:
external app >> added webserver
Name : testhttps
Address: https://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
Code:
Virtual host >> rewrite
enable script : yes
rewrite rules :
RewriteCond %{HTTPS} !=on
REWRITERULE ^(.*)$ HTTP://test/$1 [P,L,E=PROXY-HOST:wv88.online ]
RewriteRule ^(.*)$ HTTPS://testhttps/$1 [P,L,E=PROXY-HOST:wv88.online ]
 
#7
Since your backend server IP is 149.28.136.65, you should use

Code:
external app >> added webserver
Name : test
Address: http://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
instead of
Code:
external app >> added webserver
Name : test
Address: http://87.120.8.185
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
And you might want to create two webservers for both HTTP and HTTPS.
So it will be

Code:
external app >> added webserver
Name : test
Address: http://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
and
Code:
external app >> added webserver
Name : testhttps
Address: https://149.28.136.65
Set Max Connections : 2000
Set Initial Request Timeout (secs)100
Retry Timeout (secs)0
Code:
Virtual host >> rewrite
enable script : yes
rewrite rules :
RewriteCond %{HTTPS} !=on
REWRITERULE ^(.*)$ HTTP://test/$1 [P,L,E=PROXY-HOST:wv88.online ]
RewriteRule ^(.*)$ HTTPS://testhttps/$1 [P,L,E=PROXY-HOST:wv88.online ]
I have tried it but it doesn't work :cry:
 
Top