7 Replies Latest reply on Jan 5, 2002 11:07 PM by Thomas Clouser

    Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz Hel

    Scott Young Newbie

      On both Windows 2000 and NT4.0, I am having difficulty integrating Apache-1.3.22 with the pre-integrated JBoss-2.4.3_Tomcat-3.2.3 distribution from JBoss.org. I have followed the standard 3-step process:

      (1) In $TOMCAT_HOME/conf/server.xml, add directive before closing tag. (Note: The directions called for meto place this "after" the directive, which was not in the default server.xml file in my distribution.)

      (2) In $APACHE_HOME/conf/httpd.conf, add the following "Include":
      Include "C:/JBoss-2.4.3_Tomcat-3.2.3/Tomcat/conf/jk/mod_jk.conf-auto"

      (3) Downloaded the precompiled win32 mod_jk.dll and placed in $APACHE_HOME/modules folder.

      I start JBoss and Tomcat together using the $JBOSS_HOME/bin/run_with_tomcat.bat command (part of the distribution). At first glance, the JBoss-Tomcat install appears to run fine since the Tomcat JSP and Servlet examples run. However, the mod_jk.conf-auto and tomcat-apache.conf files are not created in order for the Apache installation to startup without terminal errors (which I can specifically identify as the problem when starting Apache by viewing the Application Error Log).

      One more minor detail...

      the documentation sets I have seem to be in conflict. The tomcat-apache-howto.html documentation file says these Tomcat-created dynamic setup files for Apache should be in $TOMCAT_HOME/conf/ and the mod_jk-howto.html documentation file indicates that they should be in $TOMCAT_HOME/conf/jk/. Which is correct?

      Any help would be greatly appreciated. Thank you!

        • 1. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
          Thomas Clouser Newbie

          You will need to modify the following files:

          1) server.xml in the TOMCAT_HOME\conf\ directory

          add the following in the connector section

          2) workers.properties (use copy from TOMCAT_HOME\conf as a baseline). You will need to set the following variables to match your environment...
          - workers.tomcat_home
          - workers.java_home
          - ps

          3) httpd.conf (or your custom apache config file) add the following lines...

          #Added for mod_jk - tc
          LoadModule jk_module modules/mod_jk.dll

          #Added for mod_jk - TC
          AddModule mod_jk.c

          <IfModule mod_jk.c>
          JkWorkersFile <full path>/workers.properties
          JkLogFile <full path>/mod_jk.log
          JkLogLevel debug
          JkMount /<YOUR APP NAME>/* ajp13

          (the above assumes you have downloaded a copy of the mod_jk.dll from apache and placed it in the modules directory).


          • 2. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
            Scott Young Newbie


            Thank you for your assistance.

            I have made all the changes and started the JBoss-Tomcat process by DOS shell command line and then started the Apache service. The Apache service failed again as a result of Tomcat not creating the Apache configuration file:


            This is (as above) evidenced from the Event Viewer.

            Do you have any suggestions for next steps? Possibly, did I not place the in the correct location in Tomcat's server.xml file?


            • 3. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
              Thomas Clouser Newbie

              Ahhh... I get it, you are running apache as a service. The instructions I gave are for manually running both jboss+tomcat and apache...I should have added:

              4) from a command window, run_with_tomcat from the \jboss\bin

              5) from a command window, apache -f "<config file>" from <full path>\apache

              Sorry for the confusion.

              • 4. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
                Scott Young Newbie


                Here is the output obtained by running Apache from the command line...

                C:\Apache Group\Apache>apache -f conf\httpd.conf
                fopen: No such file or directory
                apache: could not open document config file c:/jboss-2.4.3_tomcat-3.2.3/tomcat/conf/jk/mod_jk.conf-auto
                Note the errors or messages above, and press the key to exit. 12....
                C:\Apache Group\Apache>

                I am also sending the server.xml, httpd.conf and workers.properties files directly to you in a separate email.

                Thank you again for your help.


                • 5. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
                  Thomas Clouser Newbie

                  Problems with the httpd.conf (sent via email)

                  1) You must provide a JkMount, or mod_jk will not handle any request.

                  # JkMount /<MY APP NAME>/* ajp13

                  You need to define the pattern that will be handled by ajp13, for instance, if you want to be able to get the example application that ships with the JBoss+Tomcat bundle, you will need to define the following line:

                  JkMount /jboss/* ajp13

                  Which tells the mod_jk interceptor that this pattern will be handled by it using ajp13.

                  If you deploy a Web Application Archive (.war), by placing it in the <full path to bundle>\jboss\deploy, named MyApp.war, you would then need to define the following additional mount:

                  JkMount /MyApp/* ajp13

                  2) The following line most likely will not function under the bundle as JBoss is handling the deployment of apps, not Tomcat. Comment it out and explicitly define patterns (as stated above).

                  Include "C:/JBoss-2.4.3_Tomcat-3.2.3/Tomcat/conf/jk/mod_jk.conf-auto"


                  • 6. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
                    Scott Young Newbie


                    ALRIGHT! It is working. 87) I tested the JBoss examples; and, they all work. Also, I copied the contents under TOMCAT_HOME\webapps to the jboss\deploy loadpoint and modified httpd.conf to get all the JSP and servlet examples to work. I think I have the hang of this now!

                    A quick note...

                    The "C:\JBoss-2.4.3_Tomcat-3.2.3\tomcat\doc\mod_jk-howto.html" documentation that comes with the JBoss+Tomcat bundle explains that one would need to keep the Include line at the bottom of httpd.conf for an "auto-configuration". What it appears we have done is a "custom configuration", per the noted docuemnt. Does the auto-configuration work?

                    Your help is VERY much appreciated.


                    • 7. Re: Apache-1.3.1 + JBoss-2.4.3_Tomcat-3.2.3 Problems...  Plz
                      Thomas Clouser Newbie

                      Albeit it is a "custom" configuration, but the JBoss+Tomcat Bundle is custom environment. The documents that are under the tomcat directory that come with the Bundle must be taken with a grain of salt as they were written for an environment that did not include JBoss.

                      I am glad I was able to help.