Hi all,
I've read a TON of literature over the last 3 days, and I've found much of
what I need to be lacking....
After reading full documentation on the jakarta website about how the
server.xml is organized for tomcat 4, I still have some questions...
I will first explain the desired setup, then I will show what I have.
If you gracious folks can help me set this up, I will GLADLY set up a
complete HOW-TO replicating the solution on my website for all the world to
see. Lord knows you probably get a lot of questions about this. My hope is
to guide the user by the hand step by step for this complex process. I have
been using Tomcat 3 for a long time with mod_jk and have been very happy,
but I now need the newer features of Tomcat 4.
Here's the setup (everywhere hereafter, I've replaced the actual domain
names with <domainname> for privacy...just know that everytime you see that,
its actually a domain name, and ignore the < > brackets :))
Redhat Linux 7.1
Apache 1.3.19
Java JDK 1.4.0-rc
Tomcat 4.0.2 Light Edition (since I have jdk 1.4)
installed in /usr/local/apache/jakarta/tomcat
Virtual Host directories are located in:
/www/www.<domainname>.com/
/www/server.<domainname>.org/
/www/etc, etc,
Each domain name needs to run its own virtual machine, so I have set up the
following variables:
$JAVA_HOME=/usr/local/java (where i have mine installed)
$CATALINA_HOME = /usr/local/apache/jakarta/tomcat
for each virtual host, I have a directory:
/www/<domainname>.com/tomcat
this directory has the following subdirs and files for EACH Virtual Host:
/www/<domainname>.com/tomcat/bin/startup.sh
/www/<domainname>.com/tomcat/bin/shutdown.sh
/www/<domainname>.com/conf/server.xml
/www/<domainname>.com/conf/tomcat-users.xml
/www/<domainname>.com/conf/web.xml
/www/<domainname>.com/conf/catalina.policy
/www/<domainname>.com/logs/
/www/<domainname>.com/webapps/
/www/<domainname>.com/work/
The startup.sh/shutdown.sh scrips set
$CATALINA_BASE=/www/<domainname>.com/tomcat
I don't know why I need a tomcat-users.xml file in the conf dir for virtual
hosts, but if I don't include it, the tomcat instance for that virtual host
won't start. It starts if tomcat-users.xml is there.
I have compiled mod_webapp.so directly from source and it now resides in
apache's libexec directory...no problems there.
In the httpd.conf file I have the following BEFORE the virtual hosts
definitions:
LoadModule webapp_module libexec/mod_webapp.so
AddModule mod_webapp.c
Then for each virtual host (including the main server), I have in
httpd.conf:
<VirtualHost _default_>
ServerName <domainname>.com
ServerAlias www.<domainname>.com
ServerAdmin <my email address here>
.
. other vh junk here
.
WebAppConnection conn1 warp <domainname>.com:8011
# note, 8011 corresponds to the warp connector in the virtual hosts's
# server.xml located in /www/<domainname>.com/tomcat/conf/server.xml
# Also, this is a different number per virtual host...i.e. 8011, 8013,
etc
</VirtualHost>
This is what happens after I start things up:
Apache starts fine, with no error messages.
I enter a virtual host directory, and start up it's tomcat instance via:
/www/<domainname>.com/tomcat/bin/startup.sh
This instance starts up fine, and in
/www/<domainname>.com/tomcat/logs/catalina.out you see:
Starting service Apache-Tomcat-<domainname>.com
Apache Tomcat/4.0.2
For a reason that I'll eplain later, this is the ONLY log file in this
directory
Everthing so far is good.
Now, I go to the virtual host, in a web browser:
http://www.<domainname>.com/index.jsp
the page shows up, but its all TEXT!!! i.e. instead of being translated on
the server side, and the generated page being output in html, it just shows
everything, source code and all.
Now, I look into /www/<domainname>.com/tomcat/logs directory again. This
time there is a file:
apache_tomcat_<domainname>.com_log.2002-02-21.txt
which i have defined earlier in server.xml. The output is below. The fact
that the file is there now, and wasn't there before tells me Tomcat is doing
something, but I don't know what, since the translated jsp's arent
happening.
I.E. when you look into /www/<domainname>.com/tomcat/work
all you see is the following subdirectory structure:
www.<domainname>.com/_ but there is nothing in this "_" directory...nada,
which basically mean's no servlets were generated by Tomcat.
Here is the output from the newly generated log file: (the jar files are in
the lib directory of the virtual hosts WEB-INF/lib structure)
2002-02-21 21:32:36 WebappLoader[]: Deploying class repositories to work
directory /www/<domainname>.com/tomcat/work/www.<domainname>.com/_
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/activation.jar
to /winME/www/<domainname>.com/WEB-INF/lib/activation.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR
/WEB-INF/lib/gnu.regexp-1.0.8.jar to
/winME/www/<domainname>.com/WEB-INF/lib/gnu.regexp-1.0.8.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/jdbc7.1-1.2.jar
to /winME/www/<domainname>.com/WEB-INF/lib/jdbc7.1-1.2.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/mail.jar to
/winME/www/<domainname>.com/WEB-INF/lib/mail.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/poolman.jar to
/winME/www/<domainname>.com/WEB-INF/lib/poolman.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/pop3.jar to
/winME/www/<domainname>.com/WEB-INF/lib/pop3.jar
2002-02-21 21:32:36 WebappLoader[]: Deploy JAR /WEB-INF/lib/servlet.jar to
/winME/www/<domainname>.com/WEB-INF/lib/servlet.jar
2002-02-21 21:32:36 WebappLoader[]: Reloading checks are enabled for this
Context
2002-02-21 21:32:36 StandardManager[]: Seeding random number generator class
java.security.SecureRandom
2002-02-21 21:32:37 StandardManager[]: Seeding of random number generator
has been completed
2002-02-21 21:32:37 ContextConfig[]: Added certificates -> request attribute
Valve
2002-02-21 21:32:38 StandardWrapper[:default]: Loading container servlet
default2002-02-21 21:32:38 default: init
2002-02-21 21:32:38 StandardWrapper[:invoker]: Loading container servlet
invoker2002-02-21 21:32:38 invoker: init
2002-02-21 21:32:38 jsp: init
for your convenience, I have included the content of each virtual hosts'
server.xml:
<Server port="8010" shutdown="SHUTDOWN" debug="0">
<Service name="Apache-Tomcat-<domainname>.com">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8011"
minProcessors="5"
maxProcessors="75"
enableLookups="true"
acceptCount="10"
debug="0"
connectionTimeout="60000"/>
<Engine name="Apache-Tomcat-<domainname>.com"
defaultHost="www.<domainname>.com" debug="0">
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_tomcat_<domainname>.com_log."
suffix=".txt"
timestamp="true"/>
<!-- Define the default virtual host -->
<Host name="www.<domainname>.com"
debug="0"
appBase="/www/<domainname>.com/"
unpackWARs="true">
<Alias><domainname>.com</Alias>
<Context path=""
docBase="/www/<domainname>.com"
reloadable="true"
debug="0"/>
</Host>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
</Engine>
</Service>
</Server>
If you guys help, I'll post a fully detailed HOW-TO that everyone can refer
to!!! (or better yet, I can just give it to the jakarta admin people and
they can post it).
PUHLEASE help :)
Thanks,
Les Hazlewood
--
Tigger says, "Share Bandwidth!"
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>