André Warnier wrote:

<snip>

André,

Thanks very much for taking the time to write this very helpful and detailed response. I truly appreciate it.

I have basically come to terms with most of the theory in what you are saying here and slowly the light is coming on. ... BUT ....

I have managed to get my test app/site to bring up the $CATALINA_HOME default welcome page but I suspect that the only reason for this is that is where the config for this test site is pointing to as the doc root. What still is not happening is accessing say the example files from the test site. I do not have a WAR file yet so I am trying to use the example files.

If you don't mind, what I would like to do is give you a quick rundown of what I have done so far and what I am currently experiencing with this setup as it is now.

1. First, I have set up DNS so that it points to a test site i.e. test.mydomain.net
2. I have added a virtual domain to the apache (httpd) config i.e.

<VirtualHost * :80>
   ServerName test.mydomain.net
   DocumentRoot /opt/tomcat/webapps/ROOT
   <Directory /opt/tomcat/webapps/ROOT>
    Options none
    AllowOverride None
    Order allow,deny
    allow from all
   </Directory>
   ErrorLog logs/test.errors
   CustomLog logs/test.access combined
   JkMount /examples exodus
   JkMount /examples/* exodus
   JkUnMount  /images/* exodus
</VirtualHost>

3. I edited my server.xml file to:

<Server port="8005" shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
 <Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<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="test.mydomain.net">
       <Host name="test.mydomain.net" appbase="webapps"
                  unpackWARs="true" autoDeploy="true"
                  xmlValidation="false" xmlNamespaceAware="false">
       <Context path="" docBase="webapps/ROOT/"/>
       <Logger classname="org.apache.catalina.logger.FileLogger"/>
       </Host>

   <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
            resourceName="UserDatabase"/>
</Engine>
 </Service>
</Server>

4. my workers.properties file (/etc/httpd/conf)

worker.list=exodus

worker.exodus.type=ajp13
worker.exodus.host=localhost
worker.exodus.port=8009
worker.exodus.lbfactor=1

So, what happens now is that I can go to test.mydomain.net and yes, it loads the default tomcat welcome page. However, when I try to go to any of the links on the sidebar for the examples, I get the tomcat 404 error. So, it obviously is not mounting the /examples directory (but perhaps this is not possible? Does it have to be a WAR file?).

catalina.out only says the following (as far as warnings or errors):

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'appbase' to 'webapps' did not find a matching property.
WARNING:   No rules found matching 'Server/Service/Engine/Host/Logger'.
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/opt/jdk1.6.0_13/jre/lib/amd64/server:/usr/opt/jdk1.6.0_13/jre/lib/amd64:/usr/opt/jdk1.6.0_13/jre/../lib/amd64:/usr/java/packages/lib/amd64:/lib:/usr/lib

Otherwise, everything else looks normal. (as normal as I can tell ... anyway)

catalina.err shows no errors.

mod_jk.log only shows:

[Sat May 09 18:28:45 2009] [24192:2517219392] [info] init_jk::mod_jk.c (3183): mod_jk/1.2.28 initialized

and

[Sat May 09 18:45:04 2009] exodus test.mydomain.net 0.004250

And of course, the error log for the site shows these urls and files as not existing.

I believe I am understanding the theory and think I am close on the actual setup but I am surely missing something here. I think it must be the JkMount settings or some other setting I have missed.

I appreciate your indulgence while I get this together.

Cheers

Dave




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to