Tomcat config file being overwritten.

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Tomcat config file being overwritten.

Postby WebMeister73 » 06. October 2010 15:27

Hello,

I am having an issue with Tomcat addition to the Xampp install on my portable USB drive.
I have installed Xampp to the root of the drive as suggested, and I have NOT run the "setup_xampp.bat" file as was suggested if i wished to run it on a portable USB drive.

I then installed Tomcat add on, but am having an issue with Apache running properly.
Apache server aborts abnormally with an error in the log file pointing to "\Xampp\tomcat\conf\auto\mod_jk.conf" file.

I looked at the file and saw that it had a drive letter path call to the resources instead of a relative path call.

Code: Select all
<IfModule !mod_jk.c>
  LoadModule jk_module "M:/Xampp/tomcat/Xampp/apache/modules/mod_jk.so"

JkWorkersFile "M:/Xampp/tomcat/conf/jk/workers.properties"
JkLogFile "M:/Xampp/tomcat/logs/mod_jk.log"

JkLogLevel emerg

<VirtualHost localhost>
    ServerName localhost

    JkMount /examples ajp13
    JkMount /examples/* ajp13

    JkMount /host-manager ajp13
    JkMount /host-manager/* ajp13

    JkMount /docs ajp13
    JkMount /docs/* ajp13

    JkMount /manager ajp13
    JkMount /manager/* ajp13
</VirtualHost>
</IfModule>


The first problem is that there is no mod_jk.so in the "/Xampp/tomcat/Xampp/apache/modules" directory. It is compeltely empty. The second problem is that the config was auto-generated upon tomcat server start. Lastly, every time the tomcat server is restarted, this config file is generated again automatically ... with the wrong data.

I have a temporary fix in place.

I stopped the tomcat server and then changed the data in the "\Xampp\tomcat\conf\auto\mod_jk.conf" file to read:

Code: Select all
<IfModule !mod_jk.c>
  LoadModule jk_module "/Xampp/apache/modules/mod_jk.so"

JkWorkersFile "/Xampp/tomcat/conf/jk/workers.properties"
JkLogFile "/Xampp/tomcat/logs/mod_jk.log"

JkLogLevel emerg

<VirtualHost localhost>
    ServerName localhost

    JkMount /examples ajp13
    JkMount /examples/* ajp13

    JkMount /host-manager ajp13
    JkMount /host-manager/* ajp13

    JkMount /docs ajp13
    JkMount /docs/* ajp13

    JkMount /manager ajp13
    JkMount /manager/* ajp13
</VirtualHost>
</IfModule>


I then saved the file and changed the file attributes to READ ONLY.

This is preventing the file from being changed upon tomcat server start, and is allowing Apache to start and not abort abnormally.

I would like anyone's feedback as to why this is happening, and if I can correct it without using this temporary fix. What worries me is that the config was pointing to a copy of the mod_jk.so file in the "/Xampp/tomcat/Xampp/apache/modules" directory. This directory structure exists.. but is empty. I know it should be looking by default to the correct directory of "/Xampp/apache/modules".

Thank you in advance for any suggestions.
WebMeister73
 
Posts: 1
Joined: 06. October 2010 15:08

Re: Tomcat config file being overwritten.

Postby JonB » 07. October 2010 00:30

look at this topic, I think you will find it useful

viewtopic.php?f=16&t=40571&p=160368&hilit=tomcat+configuration#p160368

(I didn't answer that one)

Good Luck
:)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Tomcat config file being overwritten.

Postby iyusuf » 29. November 2010 19:52

I ran into similar issue..

The temporary solution to include the correct path in mod_jk.conf works but has anyone figured it out why mod_jk.conf was overwritten with wrong path on the first place? Thanks.
iyusuf
 
Posts: 1
Joined: 29. November 2010 19:28

Re: Tomcat config file being overwritten.

Postby JonB » 30. November 2010 01:07

my 'suspicion' is that 'setup_xampp.bat (the relocator) doesn't 'fix' tomcat when its run.

Good luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests