-
1. Re: JBoss AS 7.1 - Multiple virtual servers with mod_jk
wgaulke May 14, 2012 4:43 PM (in response to wgaulke)Some update on the issue. I tried a few more things:
1. Add a jboss-web.xml with the following content:
{noformat}
<jboss-web>
<context-root>/</context-root>
<virtual-host>test.com</virtual-host>
</jboss-web>
{noformat}
Which did not have any impact.
2. Upgrade mod_jk to the recently release 1.2.36 -> no success either. With 1.2.36 the whole connection for jboss seems not to work.
Any more tipps or advice? Does no one use jboss in production - maybe I should try mod_cluster?
-
2. Re: JBoss AS 7.1 - Multiple virtual servers with mod_jk
wgaulke May 15, 2012 6:02 PM (in response to wgaulke)1 of 1 people found this helpfulDespite the overwhelming community feedback I found a solution.
For the record and good will of sharing:
My config:
JBossAS 7.1.2 Tag (self compiled)
HTTPD 2.22
Mod_jk 1.2.32
Apache config:
{noformat}
<VirtualHost *:80>
ServerName test.com
JkMount /* node1
</VirtualHost>
<VirtualHost *:80>
ServerName another-host.com
JkMount /* node1
</VirtualHost>
{noformat}
Workers.properties:
{noformat}
worker.list=node1
worker.node1.port=8009
worker.node1.host=localhost
worker.node1.type=ajp13
{noformat}
Jboss Config:
{noformat}
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false" instance-id="node1">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="another-host.com" />
</virtual-server>
<virtual-server name="test.com">
</virtual-server>
</subsystem>
...
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
...
<socket-binding name="ajp" port="8009"/>
...
</socket-binding-group>
{noformat}
Jboss-web.xml:
{noformat}
<jboss-web>
<context-root>/</context-root>
<virtual-host>test.com</virtual-host>
</jboss-web>
{noformat}
One remark: it did not work with mod_jk 1.2.36. Also I did not try mod_cluster and have yet not configured SSL.
Maybe someone on this board is willing to share his multidomain configuration - no matter of mod_jk or mod_cluster.
-
3. Re: JBoss AS 7.1 - Multiple virtual servers with mod_jk
davidintx Jul 24, 2012 11:13 PM (in response to wgaulke)Thanks for posting that, it saved me a lot of time. One modification I made to get it to work for me was that I needed to set the default-web-module in the default virtual server. Also, I can confirm that this worked just fine with ssl. In my case, I had one site domain served with ssl and another without, going to different jboss virtual hosts, and it all worked fine.