File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Reverse Proxy with Apache and JBoss Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Reverse Proxy with Apache and JBoss" Watch "Reverse Proxy with Apache and JBoss" New topic
Author

Reverse Proxy with Apache and JBoss

Anoop Rathi
Greenhorn

Joined: Aug 15, 2012
Posts: 3
Hi,

I using Apache Tomcat (2.2.21 with mod_jk) as Load Balancer and JBoss Eap 5.1 for Clustering. I was successful in both but the issue I am facing here is Proxy.

I want to make the URL Uniform without port number so that the user doesn't know on which instance/where he is directed. Can anybody please help me with what steps to be followed to make the Apache work as reverse proxy without port number.

I am new to this field and have a very less idea about things here.

Any response with be helpful as I need to get this thing working soon.

Thanks in Advance.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986


The client would only ever use one endpoint (ip:port). The load balancer would proxy that (send along to a different ip:port). So what is the problem with giving the client one endpoint (ip:port) which will never change for them?


Please ignore post, I have no idea what I am talking about.
Anoop Rathi
Greenhorn

Joined: Aug 15, 2012
Posts: 3
Thanks for response!

Yes, I am using 443 since its for https but when it hits JBoss instance, the URL changes to https://localhost:8443/myapp. I just want it to say https://localhost/myapp.

PS I have to use this in clustering.

so https://localhost:8443/myapp, https://localhost:8543/myapp, https://localhost:8643/myapp should all show https://localhost/myapp in their URL.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Actually, that sounds more like a URL rewrite on the forward "proxy", not a true proxy connection. Which, if I recall, doesn't use 8443 for mod_jk traffic.


Customer surveys are for companies who didn't pay proper attention to begin with.
Anoop Rathi
Greenhorn

Joined: Aug 15, 2012
Posts: 3
This is a case of reverse proxy setup. URL Rewriting could be used but is not preffered/good.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

I didn't mean "use this as a solution". I meant that what you're reporting sounds like what the Apache server is presently actually doing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reverse Proxy with Apache and JBoss