Re: [users@httpd] Proxy pass settings

2020-06-15 Thread Rainer Canavan
On Fri, Jun 12, 2020 at 5:02 AM Niranjan Rao  wrote:
> [...] Example could be
>
> https://myserver/uat/app1
> https://myserver/qa/app1
>
>
> Earlier I have tried just https://myserver/app1 and it works correctly.
> But now I want to add environment to it. Applications don't know they
> are proxied and when "app1/" is accessed it sends back to "/app1/login",
> relative to app1. T

sounds like something you could fix with proxypassreverse:
https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxypassreverse

If the html generated in your tomcat also contains absolute links, the note
about mod_proxy_html may apply, but you'll have to decide for yourself
at what point you may be better off re-configuring the tomcat applications.

rainer

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Proxy pass settings

2020-06-11 Thread Niranjan Rao

Greetings,


I have spent two days trying various settings and googling for solution 
for last two days, of course no luck yet.



I want to expose two servers using proxy pass. I have done some proxy 
pass settings earlier and in those cases it worked smoothly. For the 
purpose of discussion remote server is tomcat, but should not matter as 
proxy pass is using http url.



I have same set of applications and trying to expose it from some 
server. Example could be



https://myserver/uat/app1

https://myserver/qa/app1


Earlier I have tried just https://myserver/app1 and it works correctly. 
But now I want to add environment to it. Applications don't know they 
are proxied and when "app1/" is accessed it sends back to "/app1/login", 
relative to app1. This information gets lost in translated as I want it 
to go to "/uat/app1". Same issue applies to any of the links web page 
tries to load - it's relative to app1.



I can do server config changes on tomcat side or apache side. Without 
doing any massive code surgery, is it possible to achieve what I want to 
do? Rewrite/change all links coming from "/app1/abc" to "/uat/app1/abc" 
or "/qa/app1/abc" depending upon the root?



Since it's same application, all urls are same, except the environment 
context.



Thanks,


Niranjan


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org