tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Colebatch <d...@ozemail.com.au>
Subject mod_jk and virtual hosts
Date Tue, 12 Jun 2001 13:38:55 GMT
hey list,

I haven't been able to find anything in the archive that talks about
this, so I'm going to ask potentially a stupid question.  I've got
apache/tomcat working nicely together, using mod_jk as documented. 
Thing is, I want to have a dev area on the same domain, but listening on
8080.  This is a piece of cake as far as apache goes, but I haven't been
able to get it working with tomcat.  The virtual host settings appear to
be ignored (which I assume means that the information isn't making it to
tomcat, or my understanding of the virtual hosts is off). 

I've tried sniffing the traffic to see what is passed (on 8007, even
tried 8009 in case I was way off the mark), but all I could see was the
response, I couldn't see any information being passed through.  This
says to me that I have no idea how apache tells tomcat what it wants. 
The only thing I can really think is does tomcat support virtuals on the
same name/ip with different ports?

Here's what I've got (extracts):

== httpd.conf ===

Include conf/mod_jk.conf-coxless
NameVirtualHost *
<VirtualHost *:80>
    ServerAdmin dim@coxless.com
    DocumentRoot /projects/coxless/live/htdocs
    ServerName coxless.com
    ServerAlias www.coxless.com
    ErrorLog logs/coxless.com-error_log
    CustomLog logs/coxless.com-access_log common
    JkMount /*.jsp ajp12
    JkMount /servlet/* ajp12
</VirtualHost>
<VirtualHost *:8080>
    ServerAdmin dimc@ozemail.com.au
    DocumentRoot /projects/coxless/dev/htdocs
    ServerName www.coxless.com
    ErrorLog logs/dev.www.coxless.com-error_log
    CustomLog logs/dev.www.coxless.com-access_log common
    JkMount /*.jsp ajp12
    JkMount /servlet/* ajp12
</VirtualHost>

== mod_jk.conf-coxless ==
LoadModule jk_module libexec/mod_jk.so
JkWorkersFile /packages/jakarta-tomcat-3.2.1/conf/workers.properties
JkLogFile /packages/jakarta-tomcat-3.2.1/logs/mod_jk.log
JkLogLevel debug

== server.xml ==
        <Context path="/"
                 docBase="/projects/coxless/live/webapps/coxless"
                 crossContext="false"
                 debug="0"
                 reloadable="false" >
        </Context>
        <Host name="coxless.com:8080" >
                <Context path="/"
                         docBase="/projects/coxless/dev/webapps/coxless"
                         crossContext="false"
                         debug="1"
                         reloadable="true" >
                </Context>
        </Host>
        <Host name="www.coxless.com:8080" >
                <Context path="/"
                         docBase="/projects/coxless/dev/webapps/coxless"
                         crossContext="false"
                         debug="1"
                         reloadable="true" >
                </Context>
        </Host>

workers.properties is as it comes, with the tomcat_home and java_home
set.

any feedback would be good.

cheers, and tia
dim

Mime
View raw message