Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4001

Virtual host in jboss-web.xml doesn't work

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 9.0.0.Alpha1
    • Web (Undertow)
    • None

      Define the following configuration for undertow subsystem and deploy the attached host.war with virtual host "vhost2" metada in jboss-web.xml.

            <subsystem xmlns="urn:jboss:domain:undertow:2.0">
                  <buffer-cache name="default"/>
                  <server name="default-server">
                      <http-listener name="default" socket-binding="http"/>
                      <host name="default-host" alias="localhost">
                          <location name="/" handler="welcome-content"/>
                          <filter-ref name="server-header"/>
                          <filter-ref name="x-powered-by-header"/>
                      </host>
                  </server>
                  <server name="undertow-server2">
                      <http-listener name="listener2" socket-binding="http2"/>
                      <host name="vhost2" alias="localhost4">
                          <location name="/" handler="welcome-content2"/>
                          <filter-ref name="server-header"/>
                          <filter-ref name="x-powered-by-header"/>
                      </host>
                  </server>
                  <servlet-container name="default">
                      <jsp-config/>
                  </servlet-container>
                  <handlers>
                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
                      <file name="welcome-content2" path="${jboss.home.dir}/welcome-content2"/>
                  </handlers>
                  <filters>
                      <response-header name="server-header" header-name="Server" header-value="WildFly/9"/>
                      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>
                  </filters>
              </subsystem>
      

      Deploy is failed with error message :
      14:37:27,092 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "host.war")]) - failure description:

      {"WFLYCTL0180: Services with missing/unavailable dependencies" => [ "jboss.undertow.deployment.default-server.vhost2./host is missing [jboss.undertow.server.default-server.vhost2]", "jboss.undertow.deployment.default-server.vhost2./host.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.vhost2]" ]}

              tomazcerar Tomaž Cerar (Inactive)
              rhn-engineering-ema Jim Ma
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: