A few days ago, a number of you helped me get tomcat up and running with
the example files shipped with the default install of tomcat. Just as a
reminder, I am on CentOS 5.4/64 bit system using jdk1.6.1_13, apache
tomcat 6.0.18.
I was going through this exercise because I was given a tomcat based
site to host for the next while. Having never dealt with tomcat before,
with the help of a few members of this list, I managed to get tomcat
running. So then I came to the task of getting this site going. So, here
is what I did an I hope if anyone sees anything off base (likely) they
will point it out to me.
First I created a war file of the site pages using java -cvf exodus.war *
I then put the war file inside my webapps directory at
/usr/opt/tomcat/webapps/ (this is the same directory for my default host)
I then restarted tomcat and it expanded the war file to create a
directory under webapps called exodus
In this new directory, there is a WEB-INF directory and a META-INF
directory.
I edited the web.xml file from inside WEB-INF to reflect the current
server environment, which included the following:
<context-param>
<param-name>root</param-name>
<!--
<param-value>/opt/tomcat/webapps/exodus</param-value>
-->
<param-value>/usr/opt/tomcat/webapps/exodus</param-value>
<description>
Path to where the system begins
</description>
</context-param>
<context-param>
<param-name>xmlprops</param-name>
<!--
<param-value>/opt/tomcat/webapps/exodus/WEB-INF/conf/environment.xml</param-v
alue>
-->
<param-value>/usr/opt/tomcat/webapps/exodus/WEB-INF/conf/environment.xml</par
am-value>
<description>
Used to find path to local XML props file.
</description>
</context-param>
This reflected the paths in the new server.
Inside WEB-INF, there is also a conf directory which holds an
environment.xml file. This too I edited to reflect the current server
environment, which included:
<paths>
<loginJSP>/login.jsp</loginJSP>
<parentControlJSP>/parentControl.jsp</parentControlJSP>
<baseRoot>/usr/opt/tomcat/webapps/exodus</baseRoot>
<dataRoot>/data</dataRoot>
<instanceFile></instanceFile>
<systemLogFolder>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/</systemLogFo
lder>
<systemArchiveFolder>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/archive/<
/systemArchiveFolder>
<logFile>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/codelog.txt</logFile>
<cronLog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/scheduler.txt</cronLo
g>
<broadcastLog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/broadcast.txt</b
roadcastLog>
<memoryLog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/memory.txt</memoryL
og>
<securityLog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/security.txt</sec
urityLog>
<ipmanifestlog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/ipmanifest.txt<
/ipmanifestlog>
<forumArchiveLog>/usr/opt/tomcat/webapps/exodus/WEB-INF/logs/forum.txt</fo
rumArchiveLog>
</paths>
(Sorry if the above was not necessary to send but wanted to be thorough).
My server.xml file was edited to look like this:
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html -->
<Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListen
er" />
<!-- <Listener className="org.apache.ajp.tomcat.config.ApacheConfig"
modJk="/usr/local/apache2/modules/mod_jk.so" /> -->
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Host name="exodus.zuka.net" appBase="webapps/exodus"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Engine>
</Service>
</Server>
With this, I am wondering if I have the exodus directory in the right
place as it crosses into the default host space.
My workers.properties file now looks like:
worker.list=rosewood,exodus
#
# Defining a worker named ajp13w and of type ajp13
# Note that the name and the type do not have to match.
#
worker.rosewood.type=ajp13
worker.rosewood.host=localhost
worker.rosewood.port=8009
worker.exodus.type=ajp13
worker.exodus.host=exodus.zuka.net
worker.exodus.port=8010
I have then modified the apache conf and added:
JkMount /exodus/* exodus
JkUnMount /images/* exodus
So, what is currently happening when I go to the site is that, the
index.jsp page gets rendered as text. I have added index.jsp as a
default page in httpd.conf but it says to me that apache is NOT speaking
to tomcat properly in this configuration. Hopefully someone can put me
straight on this. And sorry for all the info but again, I wanted to make
sure that I had showed all that I had done.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org