2 Replies Latest reply on Jul 29, 2011 11:05 AM by jaikiran pai

    Configure multiple domains using Apache, mod_jk and JBoss

    Harsh Patel Newbie

      I am currently running Apache (2.2), mod_jk (1.2) and JBoss (4.3) configuration on a single IP.

       

      I want to update this configuration to have two domains point to two different applications.

       

      ex. www.abc.com shall point to app1.war and www.xyz.com shall point to app2.war.

       

      I have already setup two virtual hosts and have the workers.properties setup, but I think the mod_jk is not able to interpret the virtual hosts correctly.

       

      Can anyone suggest what wrong with the config.

       

      Here's the mod_jk directives I'm using currently in the mod_jk.conf:

       

      ###########

       

      LoadModule jk_module modules/mod_jk-1.2.28-httpd-2.2.X.so

       

       

      # Where to find workers.properties

      JkWorkersFile /home/eimqa/apache/conf/workers.properties

       

       

      # Where to put jk logs

      JkLogFile /home/logs/apache/mod_jk.log

      JkShmFile /home/logs/apache/mod_jk.shm

       

       

      # Set the jk log level [debug/error/info]

      JkLogLevel error

       

       

      # Select the log format

      JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"

       

       

      # JkOptions indicates to send SSK KEY SIZE

      # Note: Changed from +ForwardURICompat.

      # See http://tomcat.apache.org/security-jk.html

      JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories

       

       

      # JkRequestLogFormat

      JkRequestLogFormat "%w %V %T"

       

      #JkMount /* app1

       

       

      #################################

       

       

      My workers.properties is the following:

       

       

      ##################################

      worker.list=app1,app2

       

       

      # Define appA

      worker.app1.port=8009

      worker.app1.host=localhost

      worker.app1.type=ajp13

      worker.app1.lbfactor=1

      worker.app1.connect_timeout=10000

      worker.app1.prepost_timeout=10000

      worker.app1.socket_timeout=230

      # This value must equal server.xml's connectionTimeout of 10 minutes

      worker.app1.connection_pool_timeout=600

       

       

      # Define appB

      worker.app2.port=8109

      worker.app2.host=localhost

      worker.app2.type=ajp13

      worker.app2.lbfactor=1

      worker.app2.connect_timeout=10000

      worker.app2.prepost_timeout=10000

      worker.app2.socket_timeout=230

      # This value must equal server.xml's connectionTimeout of 10 minutes

      worker.app2.connection_pool_timeout=600