off list contact
Anybody trying to reach me please use [EMAIL PROTECTED], as I'm unsubscribing from the mail list due to the massive volume. Neil
Re: Redhat 7.1 ApacheTomcat How-to (long)
On May 23, 2001 09:10 am, you wrote: It doesn't seem to be the problem. So far I've managed building my own mod_jk.so and starting Apache with it (I don't have any problem at Apache startup unlike days before). Now It seems like Apache doesn't recognize /examples as a Tomcat directory, it's the same message as I doesn't use Tomcat. I'd like to know the moment Apache connects with Tomcat either using 8007 port or 8009 port, because obviously, my mod_jk.so is not working there. 2001-05-24 08:10:38 - ContextManager: Adding context Ctx( /examples ) 2001-05-24 08:10:38 - ContextManager: Adding context Ctx( /admin ) Starting tomcat. Check logs/tomcat.log for error messages 2001-05-24 08:10:38 - ContextManager: Adding context Ctx( ) 2001-05-24 08:10:38 - ContextManager: Adding context Ctx( /test ) 2001-05-24 08:10:38 - ContextManager: Adding context Ctx( /sake ) 2001-05-24 08:10:40 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2001-05-24 08:10:40 - PoolTcpConnector: Starting Ajp13ConnectionHandler on 8009 2001-05-24 08:10:40 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 Do you get soething along these lines at tomcat startup? Neil
Re: Redhat 7.1 ApacheTomcat How-to (long)
On May 22, 2001 09:44 am, you wrote: Now I have the following message when I try to access to http://localhost/examples Forbidden You don't have permission to access /examples on this server. You should have something similar to the following in your $TOMCAT_HOME/conf/mod_jk.conf # # Auto configuration for the /examples context starts. # # # The following line makes apache aware of the location of the /examples context # Alias /examples /usr/local/jakarta-tomcat-3.2.1/webapps/examples Directory /usr/local/jakarta-tomcat-3.2.1/webapps/examples Options Indexes FollowSymLinks /Directory # # The following line mounts all JSP files and the /servlet/ uri to tomcat # JkMount /examples/servlet/* ajp12 JkMount /examples/*.jsp ajp12 # # The following line prohibits users from directly accessing WEB-INF # Location /examples/WEB-INF/ AllowOverride None deny from all /Location # # The following line prohibits users from directly accessing META-INF # Location /examples/META-INF/ AllowOverride None deny from all /Location ### # Auto configuration for the /examples context ends. ### Do I have to edit my httpd.conf file and add /examples?? I'd suggest adding any desiered contexts to your $TOMCAT_HOME/conf/mod_jk.conf. Neil
Re: Redhat 7.1 ApacheTomcat How-to (long)
On May 21, 2001 12:22 pm, you wrote: Hello Neil, I've tried what you recommend and everything works fine but I still have a little problem. Apache and Tomcat work well but separately (not together). I have two httpd.conf files, /etc/httpd/conf/httpd.conf This one is probably not being used if you're not using the default redhat setup. and /APACHE_HOME/conf/httpd.conf. In the procedure you've sent, you said that we have to include mod_jk.conf in /etc/httpd/conf/httpd.conf but it doesn't work out to me (http://localhost/examples doesn't find the page, but http://localhost:8080/examples does). Then I tried to do the same with /APACHE_HOME/conf/httpd.conf and I got the following message when Apache tried to start: Syntax error on line 8 of /usr/local/tomcat/conf/mod_jk.conf: API module structure 'jk_module' in file /usr/lib/apache/mod_jk.so is garbled - perhaps this is not an Apache module DSO? Looks like you'll have to compile your own module to fit your apache configuration. Neil
Re: Redhat 7.1 ApacheTomcat How-to (long)
On May 21, 2001 05:33 pm, you wrote: You must especified in the second example also the port: http://localhost:/examples Not if you've got apache, and tomcat working correctly together with your /examples context correctly setup. You can then access all of tomcats examples from http://localhost/examples without using the port # Neil
Redhat 7.1 ApacheTomcat How-to (long)
I've finally managed to get apache/tomcat running successfully on a redhat 7.1 box (with stock kernel). Since I've seen several posts asking about this so I'll post a quick how-to. Install Sun's JavaTM 2 Standard Edition, 1.3.1 RC2 from: http://java.sun.com/j2se/1.3/download-linux.html Install tomcat (I used Jakarta-Tomcat 3.2.1) Setup your classpaths, and environment in /etc/profile Here's mine: #Java Environment JAVA_HOME=/usr/local/java export JAVA_HOME #Tomcat Environment TOMCAT_HOME=/usr/local/tomcat export TOMCAT_HOME #Set Classpaths for java servlets CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$JAVA_HOME/lib/:$TOMCAT_HOME/lib:$TOMCAT_HOME/classes:. export CLASSPATH Create a directory named classes in your $TOMCAT_HOME directory Copy $JAVA_HOME/lib/tools.jar to $TOMCAT_HOME/classes Change to the $TOMCAT_HOME/classes directory Expand with the command jar xvf tools.jar Make sure you've added $TOMCAT_HOME/classes to you classpath as I did above You should be able to start tomcat as a stand alone server at this point by running the startup.sh script in $TOMCAT_HOME/bin Test the server by connecting to http://localhost:8080 Shutdown tomcat using the $TOMCAT_HOME/bin/shutdown.sh script If all works well all that remains is to integrate apache and tomcat ( if not figure out whats wrong with these directions ;-0 ) Shutdown Apache Follow the instructions at: http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/mod_jk-howto.html The only place I deviated from the instructions was: Move the original $TOMCAT_HOME/conf/mod_jk.conf to $TOMCAT_HOME/conf/mod_jk.conf-orig as a backup Copy $TOMCAT_HOME/conf/mod_jk.conf -auto to $TOMCAT_HOME/conf/mod_jk.conf Change the line -- LoadModule jk_module libexec/mod_jk.so to read -- LoadModule jk_module /usr/lib/apache/mod_jk.so ( or wherever you put it!) Add the following to your /etc/httpd/conf/httpd.conf: ### # # # Tomcat support # ### Include /usr/local/jakarta-tomcat-3.2.1/conf/mod_jk.conf I also changed /etc/rc.d/init.d/httpd to start tomcat as well. Here's my script: #!/bin/bash # # Startup script for the Apache Web Server # Modified to start apache with tomcat # by Neil Jolly [EMAIL PROTECTED] # chkconfig: - 85 15 # description: Apache is a World Wide Web server. It is used to serve \ # HTML files and CGI. # processname: httpd # pidfile: /var/run/httpd.pid # config: /etc/httpd/conf/access.conf # config: /etc/httpd/conf/httpd.conf # config: /etc/httpd/conf/srm.conf # Set path for java and tomcat #Java Environment JAVA_HOME=/usr/local/java export JAVA_HOME #Tomcat Environment TOMCAT_HOME=/usr/local/tomcat export TOMCAT_HOME CLASSPATH=$TOMCAT_HOME/lib/servlet.jar:$JAVA_HOME/lib/:$TOMCAT_HOME/lib:$TOMCAT_HOME/classes:. export CLASSPATH # Source function library. . /etc/rc.d/init.d/functions # This will prevent initlog from swallowing up a pass-phrase prompt. INITLOG_ARGS= # Source additional OPTIONS if we have them. if [ -f /etc/sysconfig/apache ] ; then . /etc/sysconfig/apache fi # Path to the httpd binary. httpd=/usr/sbin/httpd prog=httpd RETVAL=0 # Change the major functions into functions. moduleargs() { moduledir=/usr/lib/apache moduleargs=` /usr/bin/find ${moduledir} -type f -perm -0100 -name *.so | awk '{\ gsub(.*/,);\ gsub(^mod_,);\ gsub(^lib,);\ gsub(\.so$,);\ print -DHAVE_ toupper($0)}'` echo ${moduleargs} } start() { echo -n $Starting $prog: /usr/local/tomcat/bin/startup.sh daemon $httpd `moduleargs` $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] touch /var/lock/subsys/httpd return $RETVAL } stop() { echo -n $Stopping $prog: /usr/local/tomcat/bin/shutdown.sh killproc $httpd RETVAL=$? echo [ $RETVAL = 0 ] rm -f /var/lock/subsys/httpd /var/run/httpd.pid } # See how we were called. case $1 in start) start ;; stop) stop ;; status) status $httpd ;; restart) stop start ;; reload) echo -n $Reloading $prog: killproc $httpd -HUP RETVAL=$? echo ;; condrestart) if [ -f /var/run/httpd.pid ] ; then stop start fi ;; *) echo $Usage: $prog {start|stop|restart|reload|condrestart|status} exit 1 esac exit $RETVAL Restart your new integrated apache/tomcat server with /etc/rc.d/init.d/httpd start Test your new server with your browser by accessing http://localhost/examples and running some of the jsp scripts and servlets. Sorry for the long post, but hope it's
Getting java.lang.NoClassDefFoundError
I'm trying to get tomcat-3.2.1 running on a redhat 7.1 install. I've set up my java environment (correctly I believe), installed tomcat as per the docs, and ran the startup.sh script. My classpath and tomcat environments are as follows: #Java Environment JAVA_HOME=/usr/local/java export JAVA_HOME #CLASSPATH=.:$JAVA_HOME/lib export CLASSPATH #Tomcat Environment TOMCAT_HOME=/usr/local/tomcat export TOMCAT_HOME I get the following error: Using classpath: /usr/local/tomcat/lib/*:/usr/local/java/lib/tools.jar:/usr/local/tomcat/lib/servlet.jar:. [root@biathlon bin]# Exception in thread main java.lang.NoClassDefFoundError: org/apache/tomcat/startup/Tomcat I'm no java expert, but it would appear that I'm missing a classpath or using an incorrect classpath. Neil