i setup the jboss as 7 (7.1.1 final) in our machine,added the one Server Group(My_Group) using full-ha profile,and i added the two servers(server01,server02) in My_Group.
Now,i want to set the VIRTUAL HOST property.:
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">
<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="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
<virtual-server name="myapp" default-web-module="myapp">
<alias name="myapp.com"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
<context-root>/</context-root>
<virtual-host>myapp</virtual-host>
</jboss-web>
c:/windows/......./hosts Windows system
127.0.0.1 myapp.com
Because i have setuped this envir using standalone successfully. and can browse my app via myapp.com.But it's not worked in domain mode for multi servers in one server group.
who can give me some advice?? thanks