sudhesh nair

Greenhorn
+ Follow
since Jun 17, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sudhesh nair




I have multiple jvm instance of tomcat application on a unix server and its running on different port.i would like to
redirect the port and uri.How can i achieve this with the help of apache. i heard we can do it using mod_proxy.

http://myapp.xx.com:18120/offers-service-main (Actual URL)


http://myapp.xx.com/offer -when the user access this url this should get redirect to http://myapp.xx.com:18120/offers-service-main


Currently when i access http://myapp.xx.com/offer i get 404 error.

one way to achieve this is to rename my exploded app name (offers-service-main) to offer. But i dont want to do that.anyway to achieve it.


This what i have done from my side.

1) installed apache 2.2 with mod_proxy


./configure --prefix=/usr/local/apache2.0 \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http

2) Added the below config in apache


ProxyRequests Off
ProxyPreserveHost On
ProxyPass /offer http://myapp.xx.com:18120/offers-service-main
ProxyPassReverse /offer http://myapp.xx.com:18120/offers-service-main

But the above configuration dosent seems to be work. Let me know if i need to do anything on the tomcat side. Thank you
12 years ago