[jboss-user] [Installation, Configuration & DEPLOYMENT] - Several domains on the same JBoss using Apache as front

Frippe do-not-reply at jboss.com
Thu Jan 17 08:28:18 EST 2008


Hi,
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
  | <filter>
  |   |             <filter-name>URLReplacer</filter-name>
  |   |             <filter-class>classpath.GenericFilter</filter-class>
  |   |         </filter>
  |   | 
  |   |         <filter-mapping>
  |   |             <filter-name>URLReplacer</filter-name>
  |   |             <url-pattern>*.shtml</url-pattern>
  |   |         </filter-mapping>
  |   | 
  | 
  | jboss-web.xml contains
  | <context-root>/appName</context-root>
  | 
  | 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="127.0.0.1" 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"
  |   |                     directory="${jboss.server.home.dir}/log"/>
  |   | 
  |   |                 <DefaultContext cookies="true" crossContext="true" override="true"/>
  |   |             </Host>
  |   | 
  |   |            <Host .... 
  | 
  | workers.properties contains
  | # Define 1 real worker using ajp13
  |   | worker.list=worker1
  |   | 
  |   | # Set properties for worker1 (ajp13)
  |   | worker.worker1.type=ajp13
  |   | worker.worker1.host=localhost
  |   | worker.worker1.port=8009
  | 
  | partial server.xml
  | 
  | 
  |   | <VirtualHost *>
  |   |         ServerAdmin admin at 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
  |   | 
  |   | 
  |   | </VirtualHost>
  |   | 
  |   | If you could enlighten me in one of these problems I would become a very happy guy :-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120868#4120868

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120868



More information about the jboss-user mailing list