tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Connolly" <d...@puca.ie>
Subject RE: apache and tomcat and virtual domain
Date Tue, 28 Nov 2000 10:12:59 GMT
Hi Carlos,

Apologies for the delay in replying.

The way I got mine to work was to simply include a tomcat-apache config file
in my httpd.conf file. I.e. include /jakarta-tomcat/conf/tomcat-apache.test

This file should have the following form :

LoadModule jserv_module libexec/mod_jserv.so
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultPort 8007
ApJServDefaultHost localhost

AddType test/jsp .jsp

Then back in my httpd.conf file included in each virtual host I load the
ApJServMount as follows :

ApJServMount /ajsp ajpv12://localhost:8008/test

The /ajsp must be unique for every virtual host created. The /test refers to
/jakarta-tomcat/webapps/test

Then you should create a separate xml file for each virtual host.

One for a server called dave would look as follows :

<?xml version="1.0" encoding="ISO-8859-1"?>

<Server>
    <!-- Debug low-level events in XmlMapper startup -->
    <xmlmapper:debug level="0" />

    <!-- This is quite flexible; we can either have a log file per
         module in Tomcat (example: ContextManager) or we can have
         one for Servlets and one for Jasper, or we can just have
         one tomcat.log for both Servlet and Jasper.

         If you omit "path" there, then stderr should be used.

         verbosityLevel values can be:
            FATAL
            ERROR
            WARNING
            INFORMATION
            DEBUG
         -->

    <Logger name="tc_log"
            path="logs/dave_tomcat.log"
            customOutput="yes" />

    <Logger name="servlet_log"
            path="logs/dave_servlet.log"
            customOutput="yes" />

    <Logger name="JASPER_LOG"
            path="logs/dave_jasper.log"
            verbosityLevel = "INFORMATION" />

    <!-- Add "home" attribute if you want tomcat to be based on a different
directory
         "home" is used to create work and to read webapps, but not for libs
or CLASSPATH.
         Note that TOMCAT_HOME is where tomcat is installed, while
ContextManager home is the
         base directory for contexts, webapps/ and work/
      -->
    <ContextManager debug="0" workDir="work" >
        <!-- ContextInterceptor
className="org.apache.tomcat.context.LogEvents" / -->
        <ContextInterceptor className="org.apache.tomcat.context.AutoSetup"
/>
        <ContextInterceptor
className="org.apache.tomcat.context.DefaultCMSetter" />
        <ContextInterceptor
className="org.apache.tomcat.context.WorkDirInterceptor" />
        <ContextInterceptor
className="org.apache.tomcat.context.WebXmlReader" />
        <ContextInterceptor
className="org.apache.tomcat.context.LoadOnStartupInterceptor" />
        <!-- Request processing -->
        <RequestInterceptor
className="org.apache.tomcat.request.SimpleMapper" debug="0" />
        <RequestInterceptor
className="org.apache.tomcat.request.SessionInterceptor" />
        <RequestInterceptor
className="org.apache.tomcat.request.SecurityCheck" />
        <RequestInterceptor className="org.apache.tomcat.request.FixHeaders"
/>


        <Connector className="org.apache.tomcat.service.SimpleTcpConnector">
            <Parameter name="handler"
value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
            <Parameter name="port" value="8009"/>
        </Connector>

        <Context path="/djsp" docBase="webapps/dave" debug="0"
reloadable="true" >
        </Context>


    </ContextManager>
</Server>

The important lines being the Context Path. You can then write a startup
script that will start tomcat with each of your xml files.

Hope this helps,
David



-----Original Message-----
From: Carlos [mailto:linux@lpis.com]
Sent: 27 November 2000 15:55
To: tomcat-user@jakarta.apache.org
Subject: apache and tomcat and virtual domain


in my apache httpd.conf file i have in virtual domains:
<VirtualHost www.domain.com>
ServerName www.domain.com
DocumentRoot /opt/jakarta/webapps/domain
</VirtualHost>

And in jakarta server.xml fle:
<VirtualHost www.domain.com>
DocumentRoot /opt/jakarta/webapps/domain
ApjServMount /servlet /ROOT
</VirtualHost>

If i star the tomcat it says me:
errro readin server.xml file
At Next charter must be "=" after attribute www.domain.com


What can i make? what is the mistake, error?
Thaks
Anybody can send me a sever.xml conf file with virtual domains?
thansk
Carlos



Mime
View raw message