Hello, I have multiple server element inside undertow element in standalone.xml as follows:
<server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https-external"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <access-log pattern="%h %l %u [%t] "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"" directory="${jboss.server.log.dir}/default-server"/> </host> </server> <server name="ssl-server"> <https-listener name="myHttpsListener" socket-binding="https" security-realm="CertificateRealm"/> <host name="default-host" alias="localhost"> <location name="/" handler="welcome-content"/> <access-log pattern="%h %l %u [%t] "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"" directory="${jboss.server.log.dir}/ssl-server"/> </host> </server>
But my deployed applications are only visible from http instance (default-server). I need a way to share an deployment between them but I can't found any way to achieve it yet. deployment target server instance is can be specified in jboss-web.xml but it looks like only one instance is allowed. I tried some variations but nothing works as I expected.
<jboss-web> <server-instance>myserver</server-instance> <!-- does mapping to server --> <server-instance>default-server</server-instance> <!-- does mapping to server --> </jboss-web> <jboss-web> <server-instance>myserver default-server</server-instance> <!-- does mapping to server --> </jboss-web> <jboss-web> <server-instance>myserver,default-server</server-instance> <!-- does mapping to server --> </jboss-web>
I know merging two instances into one instance solves the problem but I can't go this way because recording access-log separately between different scheme (http/https) is needed. or just putting Apache on the front will solve the problem but I'd rather not to do it. any ideas? thanks.