1
域这涉及到两个职位 -托管多个虚拟主机/在wildfly
Hosting multiple domains with WildFly (Undertow),
WildFly -> Undertow -> maping subdomain to war file not working
与创建的解决方法/编辑的jboss-web.xml中似乎并没有被加工。
我尝试了这种解决方案,我的方案中两个虚拟主机完全由相同的WAR文件提供,没有上下文根配置。
在wildfly /单机/配置/ standalone.xml:
<host name="domain1" alias="domain1.rootdomain.com">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
<host name="domain2" alias="domain2.rootdomain.com">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
在的jboss-web.xml中:
<jboss-web>
<virtual-host>domain1</virtual-host>
<virtual-host>domain2</virtual-host>
</jboss-web>
在部署/重新部署Wildfly抱怨说,已经一个虚拟主机标签是处理和部署/重新部署失败。
这个问题还有其他解决方案吗?