我已经将wildfly配置为在不同的端口上侦听webservices和jfs-pages。
Maven jsf模块jboss-web.xml:
<server-instance>client-web-application</server-instance>
<virtual-host>client-web-application</virtual-host>
Maven webservice module 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还显示已连接节点和已发布上下文的列表。
这就是问题所在。当我尝试调用webservice地址或某个网页时,我从Wildfly获得404。我认为这是由于将ajp-listener放到默认服务器上引起的,因为当我将它移动到客户端-web-application网页时工作正常。
我该如何配置?我应该在apache中的mod_cluster上创建两个ajp-listeners和2个VirtualHosts吗?
答案 0 :(得分:0)
你还需要为wildfly中的每个服务器创建监听器,并在apache中创建一个单独的平衡器,是的。