Connect Tomcat with apache

Alles, was den Apache betrifft, kann hier besprochen werden.

Connect Tomcat with apache

Postby pnrc24 » 23. March 2009 14:34

I am trying to connect apache with tomcat, when i try to include a mod_jk.conf file in apache it gives me a syntax error, please check the below error:

httpd.exe: Syntax error on line 485 of C:/apache/conf/httpd.conf: Include takes
one argument, Name of the config file to be included

the following is the line of code i have added into httpd.conf file:

Include C:/Program Files/Apache Software Foundation/Tomcat 5.5/mod_jk.conf

the following are the contents of mod_jk.conf

# Load mod_jk module
# Update this path to match your modules location
LoadModule jk_module modules/mod_jk.so

# Where to find workers.properties
# Update this path to match your conf directory location
JkWorkersFile c:/tomcat/conf/workers.properties

# Where to put jk logs
# Update this path to match your logs directory location
JkLogFile c:/tomcat/logs/mod_jk.log

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

# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

# JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"

# Send everything for context /ws to worker ajp13
JkMount /ws ajp13
JkMount /ws/* ajp13

# Send everything for context /jsp-examples to worker ajp13
JkMount /jsp-examples ajp13
JkMount /jsp-examples/* ajp13

# Send everything for context /servelts-examples to worker ajp13
JkMount /servlets-examples ajp13
JkMount /servlets-examples/* ajp13
pnrc24
 
Posts: 1
Joined: 23. March 2009 14:27

Re: Connect Tomcat with apache

Postby Izzy » 23. March 2009 22:23

Your post does not seem to be XAMPP related as Apache Friends is basically XAMPP orientated.

However in your configuration files you should enclose your paths in quotes especially if there is a space in the file name like Program Files as Apache will stop at the space and only read Program.
Code: Select all
Include C:/Program Files/Apache Software Foundation/Tomcat 5.5/mod_jk.conf
Has too many spaces and when parsed would stop at C:/Program
Code: Select all
Include "C:/Program Files/Apache Software Foundation/Tomcat 5.5/mod_jk.conf"
This may work better, do the same for all your paths that are C:/ related.

TIP
Use XAMPP it has a Tomcat plugin that is auto configured on install as is all the components in XAMPP - X=various OS, AMPP=Apache, MySQL, PHP and Perl (Also there is a full Perl addon available), all configured to go out of the box if installation instructions are followed and my choice of installation is the self extracting EXE (7zip) version which eliminates any errors that may occur using the Installer version.

Where do ya get it?
http://www.apachefriends.org/en/xampp-windows.html
http://www.apachefriends.org/en/faq-xampp-windows.html
viewforum.php?f=16
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to Apache

Who is online

Users browsing this forum: No registered users and 5 guests