0

I'm using XAMPP with Apache HTTP Server and Tomcat Add-On installed.
There's a default mod_jk.conf which is generated by Tomcat when starting it.

  1. But which file generates this mod_jk.conf file?
  2. How can I modify default values? By default, it looks like this: pastebin - mod_jk.conf.
  3. How does Apache HTTP Server reach this file? I can't see any reference to this file when looking into httpd.conf.
  4. When I put a VirtualHost in my httpd.conf file, and I put the line JkMount /* ajp13 into it, Apache HTTP Server service can't start (causes a 7024 event id error in Event Viewer (with error code 1, but nothing specific), but puts no error messages into error.log. The VirtualHost looks like this: pastebin - VirtualHost + JkMount. This way Apache HTTP Server can not start. If I comment out the line JkMount /* ajp13, it starts without a problem.
  5. BUT if I put the following line, which is the same as in mod_jk.conf, before the mentioned VirtualHost again, the service can start!

    <IfModule !mod_jk.c>
        LoadModule jk_module "C:/xampp/tomcat/xampp/apache/modules/mod_jk.so"
    </IfModule>
    

Why do I have to put this line in again?

Why does that happen, that the http://localhost/example does work, so this query is redirected to AJP13, but I have to put the LoadModule line in again in another file?

EDIT: I don't have a clue why, I surely modified something, but now /example doesn't work either... And the config above gives a 500 Internal Server Error.

Sk8erPeter
  • 199
  • 1
  • 2
  • 15

3 Answers3

1
  1. If not present. It's generated by mod_jk (tomcat module for apache - called also jakarta via Apache which runs Tomcat https://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s81 )
  2. Using text editor
  3. Apache calls module mod_jk which is the tomcat itself
  4. Configure workers in Tomcat configuration file called workers.properties
  5. as in point # 4
lukaz
  • 11
  • 1
1
  1. you'll find an "Include *.conf" in your Apache configuration. If your mod_jk.conf is at the right place, Apache will read it.
Gerard H. Pille
  • 2,569
  • 1
  • 13
  • 11
0

I have to warn that I'm not familiar with XAMPP.

  1. You can trace from the script that starting Tomcat (startup.bat, maybe)

  2. Try to start Apache before starting Tomcat. Another workaround is edit and mark it as read-only.

  3. Insert a Include directive in the Apache configuration file, something like this:

    Include /tomcat/conf/mod_jk.conf

4 + 5. You haven't included mod_jk.conf, so the mod_jk.so wasn't load, therefore, Apache cannot understand the JkMount option.

EDIT: I don't have a clue why, I surely modified something, but now /example doesn't work either... And the config above gives a 500 Internal Server Error... :S

Take a look at Apache error log, it will tell you more details.

quanta
  • 51,413
  • 19
  • 159
  • 217
  • 1.) I couldn't find the answer when investigating these batch files. 2.) I really hope this was a joke... :D this means you didn't understand the question... this file is generated every time Tomcat starts!!! I think I wrote it clearly: "There's a default mod_jk.conf which is generated by Tomcat when starting it." 3.) I asked how Apache can reach this file when there are no Include parts related to mod_jk.conf in httpd.conf...but localhost/example does work, which is setup in the mentioned file. 4-5.) As I said, Apache loads this file somehow automatically, because localhost/example works... – Sk8erPeter Aug 18 '11 at 15:40
  • Sorry, but this answer would desire a vote-down, but I can't and wouldn't vote down your answer, because you tried to help at least... – Sk8erPeter Aug 18 '11 at 15:42
  • Please post the `startup.bat`, `server.xml`, and `httpd.conf`? – quanta Aug 18 '11 at 16:25