0

I am trying to map a java web application named "Cricket_rank_inspector" to the domain www.CRRI.com/cri

I plan to add the following 2 records to the httpd.conf (under section of VHOST for CRRI.com)

ProxyPass /cri ajp://105.5.131.200:8009/Cricket_Rank_Inspector ProxyPassReverse /wri ajp://105.5.131.200:8009/Cricket_Rank_Inspector

Am I correct in assuming that the above will enable http://www.CRRI.com/cri -> Java Web app.

What will be the exact URL of the web app as per my example? Also, do I need to configure something in Tomcat for assigning this specific domain (CRRI.com) to my web app? Because currently I am using IP address and Port also, when invoking this web application.

Any help and guidance would be appreciated.

Thanks, Arvind.

Arvind
  • 501
  • 4
  • 9
  • 18

1 Answers1

0

use "ProxyPreserveHost" if you define Virtual Host on your tomcat server.xml,

ProxyPreserveHost On   
ProxyPass /cri ajp://105.5.131.200:8009/Cricket_Rank_Inspector 
ProxyPassReverse /cri ajp://105.5.131.200:8009/Cricket_Rank_Inspector

if you are not define virtual host, your 2 lines config above should be enough

chocripple
  • 2,109
  • 14
  • 9
  • ok, i did what you have advised, now when I type in CRRI.com/cri -> it changes to CRRI.com/Cricket_Rank_Inspector. However I am getting an error in Internet Explorer "Oops link appears to be broken"-- does this mean that I have to use port number also if I want it to resolve to the java web app? Ideally I dont want to use port number, but even more important is not to use port 80 for java, becuase this creates security issues on the server. – Arvind Aug 04 '11 at 14:37
  • are you able to access 105.5.131.200:8009 from apache www.CRRI.com ?. what is your ServerName on apache ?, is CRRI.com or www.CRRI.com ?, could you try www.CRRI.com/cri ?. – chocripple Aug 04 '11 at 15:14
  • hello, i am not able to access at IP:8009. I can access IP:8080 or CRRI.com:8080 ... (CRRI is just an example, if you want i can give you the exact value of domain name and IP)...So currently I am able to access at crri.com:8080/, but I want to be able to specify url without the port number ( and without tomcat using port 80 which causes security risk)...is this possible? – Arvind Aug 04 '11 at 15:22
  • so you have CRRI.com:80 and CRRI.com:8080, and you want to access CRRI.com:8080/Cricket_Rank_Inspector to CRRI.com/cri right ?. just add ProxyPass /cri http ://105.5.131.200:8080/Cricket_Rank_Inspector ProxyPassReverse /cri http ://105.5.131.200:8080/Cricket_Rank_Inspector. it should be working – chocripple Aug 04 '11 at 15:32
  • i have one final question- if i use the IP as in your message, then should I install "Cricket_rank_Inspector" under the IP of my server, or should I install it under CRRI.com virtual host defined in Tomcat? – Arvind Aug 05 '11 at 08:15
  • if using ip, you just don't need "ProxyPreserveHost On", if you config using vhost on tomcat, you need it :). – chocripple Aug 07 '11 at 14:36