0 Replies Latest reply on Mar 27, 2005 6:04 AM by Wessel de Roode

    Gentoo: Mini HowTo Apache2 as frontend to JBoss

    Wessel de Roode Newbie

      This is a fast Quick start to get Apache2 web server working with JBoss as a backend application server for the first time like me an hour ago ;-).
      The OS used is Gentoo Linux.
      Both servers are running on the localhost.

      For the Jboss server I use the version 4.0.1sp1, just get it from www.jboss.org unpack it under /opt, make a symbolic link from the unpacked directory to jboss and start it up with /opt/jboss/bin/run.sh
      I presume you have Apache2 and Jboss already setup and running.

      There is nothing to configure on the Jboss side, for extra details you can read:
      http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch9.chapt.html#d0e22691

      For the non-java side there is very little to configure thanks to the emerge guys :-)

      First emerge the mod_jk2

      # emerge mod_jk2


      After the emerge finished, we need to make apache aware of the plugin
      # vi /etc/apache2/conf/apache2.conf


      Add the following line under the other LoadModule lines:
      LoadModule jk2_module extramodules/mod_jk2.so


      Now add some test url. Remove this ASP it's only for testing now.
      # vi /etc/apache2/conf/workers2.properties

      add the following lines to the end of the file:
      [uri:/web-console/*]
      worker=ajp13:localhost:8009

      This will export the web-admin of JBoss to the Apache web server.
      Restart Apache
      # /etc/init.d/apache2 restart

      Test if JBoss is running by opening the url:
      http://<your.host.name>:8080/web-console
      Ok? You should see the JBoss web console
      Test if Apache is running by opening the url:
      http://<your.host.name>/
      Ok? Now for the final test:
      open the url http://<your.host.name>/web-console
      You should see the web-admin console of the JBoss application server running over Apache.
      Great! That's all. If you need other urls just edit the workers2.properties file.

      Wessel de Roode

      References:
      http://jakarta.apache.org/tomcat/tomcat-3.3-doc/mod_jk-howto.html
      http://rimuhosting.com/mod_jk2.jsp
      http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch9.chapt.html#d0e22691