0 Replies Latest reply on Feb 9, 2015 3:03 AM by Kohei Nozaki

    Any way to share an deployment between multiple server instances?

    Kohei Nozaki Newbie

      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] &quot;%r&quot; %s %b &quot;%{i,Referer}&quot; &quot;%{i,User-Agent}&quot;" 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] &quot;%r&quot; %s %b &quot;%{i,Referer}&quot; &quot;%{i,User-Agent}&quot;" 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.