[
https://issues.jboss.org/browse/WFLY-4001?page=com.atlassian.jira.plugin....
]
Tomaz Cerar commented on WFLY-4001:
-----------------------------------
Yes for having listener --> vhost you need to define extra server, as separate servers
have their own listeners and can have multiple vhosts defined for them.
This is analogs to how apache, nginx, iis,... servers do it.
In AS7 we didn't actually have this feature, there all vhosts ware accessible trough
all listeners(connectors).
With some really ugly config hacks added later that allowed you to limit what vhost can be
accessed by connector.
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)