0
我已配置wildfly偵聽webservices和jfs頁面的不同端口。Wildfly10 mod_cluster多端口集羣。 404上的調用上下文
Maven的JSF組件的jboss-web.xml中:
<server-instance>client-web-application</server-instance>
<virtual-host>client-web-application</virtual-host>
Maven的Web服務模塊的jboss-web.xml中:
<server-instance>webservice</server-instance>
<virtual-host>webservice</virtual-host>
獨立,全ha.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"/>
<ajp-listener name="ajp" socket-binding="ajp"/>
<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>
</server>
<server name="client-web-application" default-host="client-web-application">
<http-listener name="client-app-listener" socket-binding="client-app"/>
<host name="client-web-application">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<server name="webservice" default-host="webservice">
<http-listener name="webservice-listener" socket-binding="webservices"/>
<host name="webservice">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
</subsystem>
...
<socket-binding-group name="standard-sockets" default-interface="public">
<socket-binding name="client-app" port="7998"/>
<socket-binding name="webservices" port="7990"/>
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
...
</socket-binding-group>
此配置工作正常,直到我嘗試進行羣集配置。我用mod_cluster配置了jgroupup和apache。集羣形成我可以在日誌中看到它,mod_cluster_manager還顯示連接節點和發佈的上下文的列表。
這是問題所在。當我嘗試調用web服務地址或某個網頁時,我從Wildfly獲得404。我認爲這是由於將ajp-listener放在默認服務器上導致的,因爲當我將它移動到客戶端web應用程序時,網頁可以正常工作。
我應該如何配置它?我應該在apache的mod_cluster上創建兩個ajp-listeners和2個VirtualHosts嗎?