You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Ung <pa...@sas.artsci.hawaii.edu> on 2002/07/02 02:14:20 UTC

tomcat 4.0.4 apache 2.0.39 integration

Hi,

Does anybody know of any good websites/pages that explains step-by-step how
to integrate Tomcat and Apache? I'm using Tomcat 4.0.4 and Apache 2.0.39 on
Windows 2000. I already tried the tutorial at
http://www.webmasterbase.com/article/305 but it didn't work maybe because
that tutorial was for Tomcat 4.0.3 and not 4.0.4. Should it matter? Well, if
anybody knows any other sites, please let me know.

Thanks,
Paul


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Virtual hosts/Tomcat403/Apache2039/mod_jk

Posted by Rupert Young <ru...@liberty.nildram.co.uk>.
After many days, I've got it cracked, so I thought this might help.

I am trying to set up a virtual host so that I can use the URL
bliss.mydomain.org (without any suffix), which will serve static and dynamic
(.jsp) files.

Here's what I did.

I used this guide, http://www.webmasterbase.com/article/305 to set things
up, except for the "Include" statement. I put the auto-generated (which I
don't think are quite right) directives, slightly edited, into httpd.conf
manually.

To the httpd.conf I added, at the end,

<IfModule !mod_jk.c>
  LoadModule jk_module c:/Apache/Apache2/modules/mod_jk.dll
</IfModule>
JkWorkersFile "c:/Apache/Tomcat/conf/jk/workers.properties"
JkLogFile "c:/Apache/Tomcat/logs/mod_jk.log"

JkLogLevel debug

JkMount /examples ajp13
JkMount /examples/* ajp13

<VirtualHost *>
	ServerName eai.mydomain.org
	DocumentRoot "C:/Apache/Apache2/htdocs/webdocs"
</VirtualHost>

<VirtualHost *>
	ServerName web.mydomain.org
	DocumentRoot "C:/Apache/Apache2/htdocs/webdocs/web"
	ErrorLog logs/web-error.log
	TransferLog logs/web-access.log
</VirtualHost>

<VirtualHost *>
    ServerName bliss.mydomain.org
    JkMount /* ajp13
</VirtualHost>

The first two hosts are static only (unless they have /examples context).
The bliss host will serve any dynamic files in its base directory.  The
corresponding Host directive in server.xml is,

<Host name="bliss.mydomain.org" debug="3" appBase="myapps"
unpackWARs="true">
        <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig"
append="true" />
        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="mybliss_access_log."
suffix=".txt"
                 pattern="common"/>

        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="mybliss_log." suffix=".txt"
                timestamp="true"/>

 	<Context path="" docBase="ROOT" debug="0"/>
</Host>


the files for the bliss app are in tomcat/myapps/ROOT.  Hooray !

So I can give the URL http://bliss.mydomain.org/ and index.jsp (by
redirecting from index.html) will be served by tomcat automatically.

The host names, of course, must be set up in a DNS server.

Hope this helps.
Regards,
Rupert



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>