1 Reply Latest reply on Oct 30, 2017 8:40 PM by I J

    Virtual Hosting :: Wildfly 10.1 Final

    I J Newbie

      Hi All,


      A little help would be greatly appreciated.


      My configuration:


      =========  standalone-full.xml ===============


      <subsystem xmlns="urn:jboss:domain:undertow:3.1">
        <buffer-cache name="default"/>
        <server name="default-server">
           <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
           <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
           <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content"/>
                 <filter-ref name="server-header"/>
                 <filter-ref name="x-powered-by-header"/>
            <host name="host1" alias="domain1.com,www.domain1.com" default-web-module="domain1-war.war"/>
            <host name="host2" alias="domain2.com,www.domain2.com" default-web-module="domain2-war.war"/>
          <servlet-container name="default">
                <file name="welcome-content" path="${jboss.home.dir}/www/welcome-content"/>
                <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>
                <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>



      ============ /etc/hosts ============     localhost  host1 host2


      =========== domain1-war/WEB-INF/jboss-web.xml =========







      =========== domain2-war/WEB-INF/jboss-web.xml =========







      [EDIT] ============================================


      Wildfly is launched as per:   [opt/wildfly/bin]  ./standalone.sh -b= -c=standalone-full.xml


      Thus socket bindings should not be an issue.




      1.  Server starts and all deploys and works as expected when access as host1:8080, host2:8080, localhost:8080


           Thus my webapps along with the wildfly default ROOT.war (welcome pages) work as expected.


      2.  Router port 80 is forwarded to 8080


      3.  When using the server aliases as defined in standalone-full.xml, in my case domain1.com or domain2.com the server times out and I get nothing.


      4.  I have intercepted the request headers for domain1.com and domain2.com and they are correct.




      1.  Why does wildfly not take the alias reference for the local host1 or host2 domain, that being the request host token, and serve up the appropriate webapp?


      2.  What am I doing incorrectly here?  Seems this should be simple to configure?



      Thanks You in advance for any and all help!


      Message was edited by: I J