OLS Proxy Reverse is working?

#1
Im using this link to try make working https://openlitespeed.org/kb/reverse-proxy-basics/ have access to have access my API

First I got WebAdmin console => Server Configuration => External App => Add => Type => Web Server

Name: test
Address: localhost:3001

Second I got WebAdmin console > Virtual Hosts > Add

Virtual Host Name: proxy-vhost
Virtual Host Root: $SERVER_ROOT/proxy/
Config File: $SERVER_ROOT/conf/vhosts/$VH_NAME/vhconf.conf
Max Keep-Alive Requests: 1000
Follow Symbolic Link: No
Enable Scripts/ExtApps: No
Restrained: Yes

and...

WebAdmin console > Virtual Hosts > proxy-vhost > Rewrite
Set Enable Rewrite to YES


REWRITERULE ^(.*)$ HTTP://test/$1 [P,L,E=PROXY-HOST:api.vitrimix.com.br]

to finish, WebAdmin console > Listeners > your listeners > Virtual Host Mappings > Add
Virtual Host: proxy-vhost
Domain: api.vitrimix.com.br

but when I call http://api.vitrimix.com.br on brower I aways got error 404, what I doing wrong?
 
#4
Sorry I cant Edit my post then will add new information

Virutal Hosts > proxy-vhost > Edit > Context > + > Type: Proxy > Next >

Uri: /
Web Server : [Server Level] test

and is not working
 

Cold-Egg

Administrator
#5
It works for me, see

Code:
curl -I https://api.vitrimix.com.br/

HTTP/2 200
x-powered-by: Express
access-control-allow-origin: *
content-type: application/json; charset=utf-8
etag: W/"f-V8aY9BKXDVLrPXkVFrx47mMSg74"
date: Wed, 30 Nov 2022 01:48:03 GMT
server: LiteSpeed
alt-svc: h3=":443"; ma=2592000, h3-29=":443"; ma=2592000, h3-Q050=":443"; ma=2592000, h3-Q046=":443"; ma=2592000, h3-Q043=":443"; ma=2592000, quic=":443"; ma=2592000; v="43,46"



curl https://api.vitrimix.com.br/

Api is Working!
 
Top