tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From saur...@cysphere.com (Saurabh Shukla)
Subject RE: Tomcat + Apache + mod_jk and virtual hosts
Date Mon, 19 Feb 2001 13:48:40 GMT

Can u be a bit more specific about the problem you are facing and tell
clearly what does not works or what errors u get (if any) ?

Your conf files appear ok, there might be some problem in web.xml.

Shuklix


-----Original Message-----
From: bard@orgdot.no [mailto:bard@orgdot.no]
Sent: Monday, February 19, 2001 6:45 PM
To: tomcat-user@jakarta.apache.org
Cc: bard@orgdot.no
Subject: Tomcat + Apache + mod_jk and virtual hosts


Can anyone help?

I've been trying to achieve very simple name based virtual hosting
with very little luck. I have read the mod_jk documentation but not
found what I'm looking for. I've also read a vast number of postings
in this mailing list, but found 99% more questions than answers.

Surely, somebody out there has got the answers - please share them!

What I have is:

apache-1.3.14-3
Tomcat 3.2.1
mod_jk.so (built without any errors on a my Red Hat 7.0)

What I need is:

www.domain1.com
www.domain2.com

and the ability to place sevlet1.class and servlet2.class in the
corresponding Apache
"DocumentRoot"s and accessing them as

http://www.domain1.com/servlet1
http://www.domain2.com/servlet2

I DO NOT want to place things anywhere under $TOMCAT_HOME.

Here are snippets of the various config files, set up as recommended in
the mod_jk documentation.


from server.xml
---------------

<Host name="www.domain1.com">
        <Context path=""
                 docBase="/home/www.domain1.com"
                 crossContext="true"
                 debug="0"
                 reloadable="true"
                 trusted="false" >
        </Context>
</Host>
<Host name="www.domain2.com">
        <Context path=""
                 docBase="/home/www.domain2.com"
                 crossContext="true"
                 debug="0"
                 reloadable="true"
                 trusted="false" >
        </Context>
</Host>

from httpd.conf
---------------

<VirtualHost 10.0.0.1:80>
    DocumentRoot /home/www.domain1.com
    ServerName www.domain1.com
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    ServerAdmin root@domain1.com
    ErrorLog /home/domain1/admin/log/error_log
    CustomLog /home/domain1/admin/log/access_log common

    <Directory "/home/www.domain1.com">
        Options Indexes FollowSymLinks
        AllowOverride AuthConfig
    </Directory>


    <Location "/domain1/A">
        AllowOverride None
        deny from all
    </Location>

    <Location "/domain1/B">
        AllowOverride None
        deny from all
    </Location>
</VirtualHost>

<VirtualHost 10.0.0.2:80>
    DocumentRoot /home/www.domain2.com
    ServerName www.domain2.com
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    ServerAdmin root@domain2.com
    ErrorLog /home/domain2/admin/log/error_log
    CustomLog /home/domain2/admin/log/access_log common

    <Directory "/home/www.domain2.com">
        Options Indexes FollowSymLinks
        AllowOverride AuthConfig
    </Directory>


    <Location "/domain2/A">
        AllowOverride None
        deny from all
    </Location>

    <Location "/domain2/B">
        AllowOverride None
        deny from all
    </Location>
</VirtualHost>



The loading of modules etc. works fine. Accessing the standard
examples that come with Tomcat 3.2.1 through Apache works fine.
Setting things up as I have tried above, with new contexts and virtual
hosts is a catastrophe - does not work at all! Am I making a very
obvious mistake that somebody can spot and correct for me or must I
include pages of log file extracts?

Any, any help would be greatly appreciated.


Bard

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message