Hi Everybody,
I am trying to integrate the Apache Ver 2.0.47 and Tomcat 5.5.4
using the jk connector Version 1.2.5 (downloaded binary from tomcat
site) on Solaris. I am using Apache with mod_ssl.
I have configured the jk connector in the following way:
httpd.conf:
~~~~~~~~~~~
Uncomment the Servername and set it to my mchine name.
Set UseCanonicalName to On
include $CATALINA_HOME//conf/auto/mod_jk.conf at the last.
[The mod_jk.conf file is manually written.]
ssl.conf
~~~~~~~~
Set the Listen port to 8443
Change the line <VirtualHost _default_:443> to <VirtualHost
_default_:8443>
Set the ServerName to my machine name.
mod_jk.conf
~~~~~~~~~~~
The contenets of mod_jk.conf are as follows:
///////////////////////////////////////////////////////////
# Load mod_jk
LoadModule jk_module modules/mod_jk.so
# Configure mod_jk
JkWorkersFile
/wds_binaries/jakarta-tomcat-5.5.4/conf/jk/workers.properties
JkLogFile /wds_binaries/apache2/logs/mod_jk.log
JkLogLevel debug
#JkRequestLogFormat "%H %m %p %q %r % U %v %V %w"
Alias /examples/
"/wds_binaries/jakarta-tomcat-5.5.4/webapps/servlets-examples/"
<Directory
"/wds_binaries/jakarta-tomcat-5.5.4/webapps/servlets-examples/">
Options Indexes FollowSymLinks
AllowOverride None
Allow from all
</Directory>
JkMount /examples/* testWorker1
JkMount /examples/*.jsp testWorker1
JkMount /examples/servlet/* testWorker1
////////////////////////////////////////////////////////////////
worker.properties:
~~~~~~~~~~~~~~~~~
///////////////////////////////////////////////////////////
# Setting Tomcat And Java Home
workers.tomcat_home=/wds_binaries/jakarta-tomcat-5.5.4
workers.java_home=/wds_latest/jdk1.5.0_01
ps = /
worker.list=testWorker1
# Settings for tertWorker1 worker
worker.testWorker1.port=8009
worker.testWorker1.host=my_mchine_name
worker.testworker1.type=ajp13
/////////////////////////////////////////////////////////////
server.xml
~~~~~~~~~~
I have tried following definitions of connectors one by one:
//////////////////////////////////////////////////////////////
<Connector port="8009"
enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" debug="4" />
**************************************************************
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009"
minProcessors="5"
maxProcessors="75"
acceptCount="10"
debug="4"
enableLookups="false"
redirectPort="8443"
protocol="AJP/1.3"/>
////////////////////////////////////////////////////////////////
Changed the localHost to my_machine_name.
Added the context for examples:
<Context path="/examples" debug="0" privileged="true"
docBase="/wds_binaries/jakarta-tomcat-5.5.4/webapps/servlets-examples">
Created a new file called example.xml and put it in
$CATALINA_HOME/conf/Catalina/my_mc_name/
The contents of that file is as follows:
/////////////////////////////////////////////////
<Context
docBase="/wds_binaries/jakarta-tomcat-5.5.4/webapps/servlets-examples"
privileged="true" antiResourceLocking="false"
antiJARLocking="false">
<!-- Link to the user database we will get roles from -->
<ResourceLink name="users" global="UserDatabase"
type="org.apache.catalina.UserDatabase"/>
</Context>
/////////////////////////////////////////////////
Now when I access my apache web server from browser by giving command
https://my_machine_name:8443, it opened the page successfully.
But when I tried
https://my_machine_name:8443/examples or
https://my_machine_name:8443/examples/some_html_file.htm then in
catalina.out I got
Dec 24, 2004 5:00:45 PM org.apache.jk.common.MsgAjp processHeader
SEVERE: BAD packet signature 256
I am wondering why it is coming.
I want to use jk connector only with this.
Why I am getting this error. Apache is able to make the connection with
Tomcat but why error is coming?
One thing more:
I have to put my class files in the the servlets-examples directory
under classes. Do I need to do something extra for this? I have already
added the context in server.xml as described above.
I haven't change any web.xml file.
Regards
Abhishek