tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harold Pritchett <>
Subject Strange problem with Apache2/Tomcat4
Date Fri, 30 Jul 2004 00:26:34 GMT

I'm trying to install Apache HTTPD and Jakarta Tomcat and get them
to play nice together.  I've done this before with different
releases of the software, so I can't figure out what I'm doing wrong.

First, the releases of the software I'm using:

SuSE Linux Standard Server 8, done as a "basic" install.  The default
Apache 1.3 server was removed with "rpm" before any of this was done.


Sun Java J2SE:  j2sdk-1_4_2_05

Apache is installed in /usr/local/apache2
Tomcat is installed in /usr/local/jakarta-tomcat-4.1.30
      and then linked to /usr/local/tomcat
Java is installed in /opt/j2sdk1.4.2_05
      and then linked to /usr/lib/java

Some environment variables (some lines wrapped for readability):


Finally, here's what I did:

1.  Install SSL in /usr/local/ssl
2.  Install Apache HTTPD.  Used:

     ./configure --prefix=/usr/local/apache2 \
	--enable-so --enable-rewrite --enable-ssl \
	--with-ssl=/usr/local/ssl --enable-proxy
     su -
     make install
     cd /usr/local/apache2/bin
     ./apachectl start

     Started up a web browser and connected to http://localhost.
     Got the standard "You have installed apache httpd" page.
     The httpd server works fine.

     ./apachectl stop

3.  Install tomcat server.  Used:

     Created user and group "tomcat4"
     Downloaded tomcat 4.1.30 binary distribution to /download/bin
     cd /usr/local
     tar zxf /download/bin/jakarta-tomcat-4.1.30.tar.gz
     ln -s jakarta-tomcat-4.1.30/ tomcat
     chown -R tomcat4.tomcat4 /usr/local/tomcat

     check to see if tomcat is running with "ps ax"
     Started up a web browser and connected to http://localhost:8080.
     Got the standard Tomcat home page.  Clicked on the "JSP Examples"
     link.  Got the "JSP Examples" page.  I then clicked on EVERY
     SINGLE EXAMPLE and made sure it worked.  Ditto for the "Servlet"
     examples.  Everything works fine!  stopped the server with


     OK, httpd works fine and tomcat works fine, independently.  Next,
     make them work togehter.

4.  Install the Mod_JK connector.

     download the source for the connector from

     unpack into a temp directory, configure, and make.

     cd /tmp
     tar zxf /download/src/jakarta-tomcat-connectors-jk-1.2-src-current.tar.gz
     cd jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
     ./configure --with-apxs=/usr/local/apache2/bin/apxs
     cd apache-2.0/
     cp /usr/local/apache2/modules

     now, build the file in /usr/local/tomcat/conf/jd

     cd /usr/local/tomcat/conf
     mkdir jk
     cd jk
     cd ..

     Edit the server.xml file and make the following changes

     Following the line beginning <Server port="8005" shutdown="SHUTDOWN"
     insert the lines:

	<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
	    modJk="/usr/local/apache2/modules/" />

     and following the lines:

       <!-- Define the default virtual host -->
       <Host name="localhost" debug="0" appBase="webapps"
        unpackWARs="true" autoDeploy="true">

     insert the lines

       <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
          append="true" forwardAll="false"
          modJk="/usr/local/apache2/modules/" />

     and finally, edit the /usr/local/apache2/conf/httpd.conf and place
     a line at the very end which says:

	Include /usr/local/tomcat/conf/auto/mod_jk.conf

Start Tomcat, wait 30 seconds and start apache

Use a browser and connect to http://localhost.  Get the Apache default
screen.  Connect to http://localhost/examples.  Since this is only
defined as a directory, we get the usual apache display of a directory
with three sub-directories.  Looks exactly like what we would expect.

CLick on "jsp"  Since there is a "index.html" file in this directory, we
get the "JSP Samples" page.  Still exactly what we expected.  Everything
is looking fine so far.

Let's try the first jsp, "numberguess"  Click the "execute" link.

Do we get the numberguess screen?  No.  We get a screen which says

"Internal Server Error"

"The Server encountered an internal error or misconfiguration
and was unable to complete your request."

"Please contact the server administrator, and inform
them of the time the error occurred and anything you might have done
that may have caused the error."

"More information about this error may be available in the server
error log"

This is the case with all of the buttons which invoke a "jsp" first.
for several of the pages which start with an "html" file which then
invokes a jsp, the html page displays OK and the error comes up when
it tries to invoke the jsp.  For example, check out the "carts" or
"checkbox" applications.

Ditto for the servlets.  All of the servlets give exactly the same

If I immediately connect to http://localhost:8080 (without doing anything
to the servers,) all of the applications work just fine.

And to add insult to injury, there is nothing in any of the logs.  Nothing
in the web server logs, and nothing in the tomcat logs.


Anyone have any ideas???

Thanks in advance for looking at this with fresh eyeballs.  I've been
beating it for the past three days and am getting a bit burned out.


Harold Pritchett                                +1.706.546.0692
pgp public key:

"They that can give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety."
    Benjamin Franklin, Historical Review of Pennsylvania, 1759.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message