[jboss-jira] [JBoss JIRA] (WFLY-4001) Virtual host in jboss-web.xml doesn't work

Jim Ma (JIRA) issues at jboss.org
Sun Oct 26 23:33:35 EDT 2014


    [ https://issues.jboss.org/browse/WFLY-4001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13015129#comment-13015129 ] 

Jim Ma commented on WFLY-4001:
------------------------------

Thanks Tomaz. How can I define the http-listener for "vhost2" ?   I intend to start another http port which is dedicated for "vhost2", like the following AS7 configuration . Do I have to define another server-instance with different http-listener and vitural host element ?  Should we allow specify http-listener for host element ?
{code}       
 <subsystem xmlns="urn:jboss:domain:web:2.1" default-virtual-server="default-host" native="false">
            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
            <connector name="http-1" protocol="HTTP/1.1" scheme="http" socket-binding="http-1">
                <virtual-server name="localhost4"/>
            </connector>
            <virtual-server name="default-host" enable-welcome-root="true">
                <alias name="localhost"/>
                <alias name="example.com"/>
            </virtual-server>
            <virtual-server name="localhost4" enable-welcome-root="true">
                <alias name="localhost4"/>
            </virtual-server>
  </subsystem>
{code}


> Virtual host in jboss-web.xml doesn't work
> ------------------------------------------
>
>                 Key: WFLY-4001
>                 URL: https://issues.jboss.org/browse/WFLY-4001
>             Project: WildFly
>          Issue Type: Task
>          Components: Web (Undertow)
>    Affects Versions: 9.0.0.Alpha1
>            Reporter: Jim Ma
>            Assignee: Tomaz Cerar
>         Attachments: host.war
>
>
> Define the following configuration for undertow subsystem and deploy the attached host.war with virtual host  "vhost2" metada in jboss-web.xml. 
> {code: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>
> {code}
> 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]"
> ]}



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the jboss-jira mailing list