开发者

How to bind an ip AND ports to subdomains using JBoss (Or Apache Tomcat)

This is my problem:

I have a JBoss server (Runni开发者_如何学Pythonng an existing app) and a Apache Tomcat (Running an app created by me) server running on the same server with different ports.

I have two subdomain names which i have routed to the IP of the server.

What i need to do is to bind the subdomain names to the IP, but with different ports.

I saw an easy way to do it with XAMPP and apache, editing the httpd.conf, but i can't find any simular fway to do it with Apache Tomcat or JBoss.

Does anyone have any ideas about this?


I rather have a solution on the question above, but the question below can be accepted as a backup solution:

Since i could not figure that out, i had to at least have a solution to one of the applications (the one running at JBoss).

So i configured JBoss to port 80 instead of 8080. What happens now if i go to the subdomains is that i get the JBoss welcome window. How can i change the default JBoss "app" to my app?

Thanks in advance


There's no way to get this:

sub1.domain.com(192.168.0.1) on port 80 --> jboss app
sub2.domain.com(192.168.0.1) on port 80 --> tomcat app

without either adding to or subtracting from your software stack.

Your options are:

  • use jboss to run your tomcat app
  • add a reverse-proxy
  • use an HTTP-aware layer 7 firewall

The first is probably easiest; jboss deploys web applications using tomcat (or, in more recent versions, a fork of tomcat called jbossweb), so you can probably just drop your .war into the deploy directory.

If that's not possible for some reason, I'd use a reverse-proxy. Apache HTTPD with mod_proxy or mod_jk is fairly common. If you go the mod_jk route and you have non-trivial load, I'd review this.

The last I'm not familiar with. I imagine that the spendy Cisco firewalls can do this, and I'm sure it's possible to hack iptables to do it too, but my google-fu failed to find specifics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜