apache - WildFly -> Undertow -> maping subdomain to war file not working -


wildfly 8.1.0 final windows server 2012 r2

i have 2 sub-domains pointing @ server, , want requests each sub-domain trigger different war file:-

webapp.domain1.com -> wildfly server -> myapp1.war test.domain2.net -> wildfly server -> myapp2.war 

my standalone.xml file configured follows based on advice received on jboss developer site:-

<subsystem xmlns="urn:jboss:domain:undertow:1.1">   <buffer-cache name="default"/>    <server name="default-server">     <http-listener name="default" socket-binding="http"/>      <host name="default-host" default-web-module="myapp1.war" alias="webapp.domain1.com"/>     <host name="other-host" default-web-module="myapp2.war" alias="test.domain2.net"/>   </server>    <servlet-container name="default">     <jsp-config/>   </servlet-container>    <filters>     <response-header name="server-header" header-value="wildfly/8" header-name="server"/>     <response-header name="x-powered-by-header" header-value="undertow/1" header-name="x-powered-by"/>   </filters> </subsystem> 

pointing browser @ webapp.domain1.com or test.domain2.net results in request being sent wildfly server expected, same war file (myapp1.war) triggered in both cases.

switching 'name' values of <host .../> elements follows results in myapp2.war being called whichever url used:-

    <host name="other-host" default-web-module="myapp1.war" alias="webapp.domain1.com"/>     <host name="default-host" default-web-module="myapp2.war" alias="test.domain2.net"/> 

it looks undertow processing details of "default-host" entry.

can here please?

failing that, know if (and how) wildfly can used apache web server?

many thanks,

andrew

this bug in current undertow subsystem implementation. processes default-web-module default host , doesn't take account non default hosts.

i created https://issues.jboss.org/browse/wfly-3639 track & fix it.

as workaround until fixed add

jboss-web.xml web-inf of myapp2.war

with content:

<jboss-web>     <virtual-host>other-host</virtual-host>     <context-root>/</context-root> </jboss-web> 

which tell server host & context root should bound to.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -