using Apache as a front end to a running Tomcat instance
Hi,
I am having a problem. I use Ubuntu 10.04 server edition. Two computers on LAN one with Public Ip A other with local (Class C IP)say it B With a third computer in same subnet I can access a TomCat application running on B as http://Ip of B:8080/application I want to use A as a Reverse Proxy for this application to be reachable from internet. So on Googling I came across some thing known as mod_ajp I enabled that on my Server A as a2enmod proxy a2enmod proxy_ajp a2enmod headers but after that I am not able to understand as how do I define vhost to be able to forward HTTP request which come on A as www.myserver.com/app to B which I can see internally as http://Ip of B:8080/application so Tomcat on B handles this. |
Hi again,
Try the usual reverse proxy setup on apache: Code:
ProxyPass /app http://x.x.x.x:8080/app |
:) Hi actually the reason I asked this problem is I had tried what you are saying.
When I had used it as Code:
ProxyPass /app http://x.x.x.x:8080/app http://www.mydomain.com/app/path/to/some/image/ I expect it to internally be forwarded as Code:
is having an element in path as /app then it is able to connect but there are many requests which are generated at B as Code:
GET /library/skin/default/portal.css if a requests is http://www.mydomain.com/app/path/to/some/image/ it is served but if a request for http://www.mydomain.com/app is generating a URL as http://www.mydomain.com/library/js/jquery.js then the request dies at A itself since /library would not be Proxied to B. My problem is the application is generating how many URL's like this that is not known to me. Some one suggested me to use Apache as a front end to Tomcat so I googled across and came some links. Tried some configurations which I think were wrong so wanted if this way some one has used and they can share how they did it. |
Can't you configure the backend application, so that it's aware it's running behind a proxy?
Quote:
Regards |
Quote:
Thanks for your link I will try it. |
All times are GMT -5. The time now is 04:39 PM. |