1 Reply Latest reply on Jan 18, 2008 2:54 AM by Fredric

    Several domains on the same JBoss using Apache as front

    Fredric Newbie

      I am attempting to set up an environment where I deploy war applications for different domains -one war app / domain.
      I'm using mod_jk to handle the Apache - JBoss connection.

      My problems are the following:

      I can't seem to destinguish the different apps from different domains.
      A servlet filter won't work at all
      Do I really need to set up a JkMount /servletPathXXX* worker1 for each servlet path in the virtual host?

      I am using the following set-up:

      one war file / domain

      web.xml contains

      jboss-web.xml contains

      server.xml contains ajp set up and several hosts (1 host / domain)
       <!-- Define an AJP 1.3 Connector on port 8009-->
       <Connector port="8009" address="" protocol="AJP/1.3"
       emptySessionPath="true" enableLookups="false" redirectPort="8443" />
      <Host name="appName" autoDeploy="false" deployOnStartup="false" deployXML="false">
       <Valve className="org.apache.catalina.valves.AccessLogValve"
       prefix="things" suffix=".log" pattern="common"
       <DefaultContext cookies="true" crossContext="true" override="true"/>
       <Host ....

      workers.properties contains
      # Define 1 real worker using ajp13
      # Set properties for worker1 (ajp13)

      partial server.xml

      <VirtualHost *>
       ServerAdmin admin@domain.se
       DocumentRoot /home/hosts/domain/www
       ErrorLog /var/log/apache2/domain_error.log
       ServerName www.domain.se
       # Servlet URIs
       JkMount /servletPath1* worker1
       JkMount /servletPath1* worker1
       CustomLog "|/usr/sbin/rotatelogs /var/log/apache2/www.domain.se_access.log.%Y%m%d 8600" combined
      If you could enlighten me in one of these problems I would become a very happy guy :-)

        • 1. Re: Several domains on the same JBoss using Apache as front
          Fredric Newbie

          I was able to solve some of the problems:

          I had some old stuff left in an apache config, it was hindering my filter to

          I had to add an tag in the host config to make it work - I also added a context, pointing out the exact WAR in the host config.

          I'm still not sure about the last thing - is there another way to do this - it seems cumbersome to have the same servlet paths both in Apache's virtual host config as well as in web.xml.