I need to configure 2 virtual hosts (mydomain1.com and mydomain2.com).
I write in JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml:
.... <Connector port="80" address="the IP adress" ...protocol="HTTP/1.1".../> <Connector port="8009" .... protocol="AJP/1.3"... /> <Enginee name="jboss.web" defaultHost="mydomain1.com"> <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm".../> <Host name="mydomain1.com" autoDeploy="false" deployOnStartup="false" deployXML="false" configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"> <Alias>www.mydomain1.com</Alias> <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> </Host> <Host name="mydomain2.com" autoDeploy="false" deployOnStartup="false" deployXML="false" configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"> <Alias>www.mydomain2.com</Alias> <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" transactionManagerObjectName="jboss:service=TransactionManager" /> </Host> </Engine>
<context-root>/mydomain1</context-root> <virtual-host>mydomain1.com</virtual-host> </jboss-web>
<body> wellcome to mydomain1.com </body> ...
<context-root>/mydomain2</context-root> <virtual-host>mydomain2.com</virtual-host> </jboss-web>
<body> wellcome to mydomain2.com </body> ...
is there anyone from JBoss who can give me a response on the right way to configure virtual hosts ??
is it possible to have an exhaustiv example that works ?