You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jinesh Varia <ji...@yahoo.com> on 2003/03/08 00:14:16 UTC

tomcat+apache+mod_jk2 and Internal Server Error

hello

 am getting Internal Server Error.when I tried to access and execute any servlet/jsp

at the end. I am attaching on what I did....

But my apache is running damn cute....but it is not allowing me to execute any servlet

the access_log says:
[Fri Mar 07 18:01:51 2003] [error] [client 141.158.216.102] client denied by server configuration:
/usr/local/apache2/jakarta-tomcat-4.1.18/webapps/examples/WEB-INF/index.html

there is something wrong in mapping...

I just can access http://dblpseer.ist.psu.edu/examples/ to get the list of directories then when I
click on jsp/servlets...I get the examples page...but I am not able to execute any servlets

I am able to access and execute the servlets properly if I use lynx terminal on the same server
(http://localhost:8080/examples) But I cannot access when I publicly access it as
http:/dblpseer.ist.psu.edu/examples/ Is there any not open ports problem? that my machine has
restricted any connection from outside? how to fix that.

Jinesh


Configuration of apache 2.0.4 with Tomcat 4.1.18 using mod_jk2 connector
refered : http://www.johnturner.com/howto/rh72-howto.html

1. Installing tomcat
previously installed apache on /usr/local/apache2
installed tomcat on /usr/local/apache2/jakarta-tomcat-4.1.18 or similar.
CATALINA_HOME=/usr/local/apache2/jakarta-tomcat-4.1.18 
JAVA_HOME=/export/pkg/java/j2sdk1.4.1_01

2. Jk2 connector 
Download mod_jk-2.0.43.so from apache web
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.2/bin/linux/i386/. 
and saved it under /usr/local/apache2/modules/

3.created workers2.properties 
create a file workers2.properties into /usr/local/apache2/conf and place this content into it:

# shared memory handling
[shm]
file=/usr/local/apache2/jakarta-tomcat-4.1.18/work/jk2.shm 
size=1048576

#Define the communication channel
[channel.socket:130.203.156.242:8009] 
info=Ajp13 forwarding over socket
tomcatId=130.203.156.242:8009 

#Map the Tomcat examples webapp to the Web server uri space
[uri:/examples/*]
info=Map the whole webapp

4. jk2.properties
uncommented the line in /usr/local/jakarta-tomcat-4.1.18/conf/jk2.properties
shm.file=${jkHome}/work/jk2.shm

5.server.xml
look for a line that says "Server" and has a port of 8005. Add the following directly below: 
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
modJk="/usr/local/apache2/modules/mod_jk.so" />  

6. server.xml
added in the host
  <Host name="dblpseer.ist.psu.edu" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true">
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true" forwardAll="false"
modJk="/usr/local/apache2/modules/mod_jk.so" />


7.httpd.conf
httpd.conf in APACHE_HOME/conf. Scroll down to where you see a bunch of lines that say
"LoadModule". At the end of this list, added a line that says: 
LoadModule jk_module modules/mod_jk-2.0.43.so 

8.httpd.conf
 adding the following line at the very end: 
Include /usr/local/tomcat/conf/auto/mod_jk.conf 









--- Dani <al...@eresmas.com> wrote:
> Hello Jin.
> Yes, I'd those problems (and more). I'll try to help you (because it was
> terrible the time I was looking for the solution).
> 
> I've got Red Hat Linux 7.2 installed on my server machine.
> 
> These are the steps:
> * I supose you've installed apache on /usr/local/apache2 or something like
> that and tomcat on /usr/local/jakarta-tomcat-4.1.18 or similar. I supose
> you've got a CATALINA_HOME=/usr/local/jakarta-tomcat-4.1.18 and a JAVA_HOME,
> CLASSPATH.
> 
> * Download mod_jk-2.0.43.so from apache web. I don't remember exactly where
> this module is ubicated. You'll have to look for  it. You have to copy it
> into /usr/local/apache2/modules (or similar directory where you've installed
> apache)
> 
> * You must create a file workers2.properties into /usr/local/apache2/conf
> and place this content into it:
> # shared memory handling
> [shm]
> file=/usr/local/jakarta-tomcat-4.1.18/work/jk2.shm ***(YOU MUST CREATE THIS
> EMPTY FILE INTO THIS DIRECTORY)***
> 
> size=1048576
> 
> #Define the communication channel
> [channel.socket:192.168.5.1:8009]  *** PUT THE IP SERVER YOU'RE USING ***
> info=Ajp13 forwarding over socket
> tomcatId=192.168.5.1:8009 *** PUT THE IP SERVER YOU'RE USING ***
> 
> 
> #Map the Tomcat examples webapp to the Web server uri space
> [uri:/examples/*]
> info=Map the whole webapp
> 
> 
> * You must create (or modify) a file into
> /usr/local/jakarta-tomcat-4.1.18/conf jk2.properties with this content:
> shm.file=${jkHome}/work/jk2.shm
> 
> * Modify server.xml on /usr/local/jakarta-tomcat-4.1.18/conf  this way:
> ...
> <Service name="Tomcat-Apache">
> ...
> 
> I think that's all, folks :-). You must restart tomcat (with command
> "/usr/local/jakarta-tomcat-4.1.18/bin/catalina start" you wil start tomcat).
> It's very important saying the Lord's Prayer while you're doing all  this
> and it will work.
> 
> good luck.
> 
> 
> ----- Original Message -----
> From: Jinesh Varia <ji...@yahoo.com>
> To: <al...@eresmas.com>
> Sent: Thursday, March 06, 2003 10:21 PM
> Subject: tomcat 4 and apache 2
> 
> 
> > Hi Dani,
> >
> > I am also having the EXACT same problem you are facing,
> > 1. cannot find apache-tomcat.conf file that is suppsed to be generated
> > 2. using Tomcat 4.1.18 on apache2
> > 3. apache works fine
> > 4. tomcat when I start it starts : but I cannot load the examples
> http://localhost:8080/ deafult
> >
> > I am sure you might have found a work around/solution. can u let me know
> PLEASE!!
> >
> > asking for a professional courtesy,
> > Jin
> >
> > =====
> > -----------------------------------------------------------------
> > Jinesh Varia
> > Graduate Student, Information Systems
> > Pennsylvania State University
> > Email: jinesh@psu.edu
> > -----------------------------------------------------------------
> > 'Self is the author of its actions.'
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Tax Center - forms, calculators, tips, more
> > http://taxes.yahoo.com/
> 


=====
-----------------------------------------------------------------
Jinesh Varia
Graduate Student, Information Systems
Pennsylvania State University
Email: jinesh@psu.edu
-----------------------------------------------------------------
'Self is the author of its actions.'

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org