Hi,
Trying the enterprise 2cpu atm. Trying to replicate a nginx/apache combo which utilises some reverse proxying of folders to multiple app servers.
So www.example.com/shop goes to another php shop vm server. .com/news to a rails app, you get the idea.
Each of these 'proxied' apps run thinking they are the root i.e. they work on /.
Nginx can reverse proxy these fine and I believe litespeed can too. I've set up the proxy as webserver in external app etc and it does indeed proxy, but retains the folder/uri.
The nginx snippet is:
The key being the additional slash on the proxy pass, which replaces the uri with the proxy loc.
So to restate/clarify, I'm looking for example.com/shop/products.php to be seen on the target proxied app server as a request for 10.0.0.2/products.php from litespeed.
I've tried a few combinations of trailing slash and re-read proxy docs. Nothing lept out, what did I miss?
Thanks for reading.
Trying the enterprise 2cpu atm. Trying to replicate a nginx/apache combo which utilises some reverse proxying of folders to multiple app servers.
So www.example.com/shop goes to another php shop vm server. .com/news to a rails app, you get the idea.
Each of these 'proxied' apps run thinking they are the root i.e. they work on /.
Nginx can reverse proxy these fine and I believe litespeed can too. I've set up the proxy as webserver in external app etc and it does indeed proxy, but retains the folder/uri.
The nginx snippet is:
Code:
upstream nginx_shop_srv {
server 10.0.0.2 fail_timeout=0;
server 10.0.0.3 fail_timeout=0 backup;
}
location ^~ /shop {
proxy_pass http://nginx_shop_srv/;
break;
}
So to restate/clarify, I'm looking for example.com/shop/products.php to be seen on the target proxied app server as a request for 10.0.0.2/products.php from litespeed.
I've tried a few combinations of trailing slash and re-read proxy docs. Nothing lept out, what did I miss?
Thanks for reading.