Help!
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.
openssl-0.9.7d httpd-2.0.50 jakarta-tomcat-4.1.30 jakarta-tomcat-connectors-jk-1.2.5
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):
JRE_HOME=/usr/lib/java/jre PATH=/usr/lib/java/bin:/sbin:/usr/sbin:/usr/local/sbin:/root/bin: /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games: /opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin: /opt/gnome/bin JAVA_BINDIR=/usr/lib/java/bin JAVA_HOME=/usr/lib/java SDK_HOME=/usr/lib/java JDK_HOME=/usr/lib/java CLASSPATH=/usr/local/tomcat/bin/bootstrap.jar: /usr/lib/java/lib/tools.jar: /usr/local/tomcat/common/lib/servlet.jar:. JAVA_ROOT=/usr/lib/java CATALINA_HOME=/usr/local/tomcat
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 make 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 /usr/local/tomcat/bin/startup.sh
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
/usr/local/tomcat/bin/shutdown.sh
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 jakarta.apache.org.
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 ./buildconf.sh ./configure --with-apxs=/usr/local/apache2/bin/apxs make cd apache-2.0/ cp mod_jk.so /usr/local/apache2/modules
now, build the workers.properties file in /usr/local/tomcat/conf/jd
cd /usr/local/tomcat/conf mkdir jk cd jk vi workers.properties cat workers.properties worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp1 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/mod_jk.so" />
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/mod_jk.so" />
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, [EMAIL PROTECTED] 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 error.
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.
Help!
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
-- Harold Pritchett [EMAIL PROTECTED] +1.706.546.0692 pgp public key: http://www.arches.uga.edu/~harold/pgpkey.html
"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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]