tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Tinnes" <tin...@ecliptictech.com>
Subject Help with TC3.2 and multiple vhost webapps
Date Fri, 27 Oct 2000 04:11:30 GMT

Can someone please instruct me on how to setup a virtual host environment
that allows for multiple application contexts with a structure like the
following..

/virtual/"hostname1"/www/htdocs
/virtual/"hostname1"/www/webapps
...
/virtual/"hostname9"/www/htdocs
/virtual/"hostname9"/www/webapps

- 'htdocs' will serve static files and generic .jsp and servlets
- 'webapps' will serve applications specific to the virtual host

I'm using the 3.2b6 milestone build with Apache 1.3.12-modssl and the apj13
connectors. I can come close to the desired config, but have to use a single
webapps location. I'm sure this is possible, but I find the number of
configuration files bewildering and the documentation sparse.

Here are the relevant portions of the config files I'm using..

---- httpsd.conf ----

<VirtualHost host1>
    DocumentRoot /virtual/host1/www/htdocs

    JkWorkersFile /usr/local/tomcat/conf/workers.properties
    JkLogFile /var/log/mod_jk.log
    JkLogLevel warn
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13

    Alias /store "/virtual/host1/www/webapps/store"
    <Directory "/virtual/host1/www/webapps/store">
        Options -Indexes
        DirectoryIndex start.jsp
    </Directory>

    JkMount /store/servlet/* ajp13
    JkMount /store/*.jsp ajp13

    <Location "/store/WEB-INF/">
        AllowOverride None
        deny from all
    </Location>
    <Location "/store/META-INF/">
        AllowOverride None
        deny from all
    </Location>
</VirtualHost>

<VirtualHost host2>
    DocumentRoot /virtual/host2/www/htdocs

    JkWorkersFile /usr/local/tomcat/conf/workers.properties
    JkLogFile /var/log/mod_jk.log
    JkLogLevel warn
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13

    Alias /store "/virtual/host2/www/webapps/store"
    <Directory "/virtual/host2/www/webapps/store">
        Options -Indexes
        DirectoryIndex start.jsp
    </Directory>

    JkMount /store/servlet/* ajp13
    JkMount /store/*.jsp ajp13

    <Location "/store/WEB-INF/">
        AllowOverride None
        deny from all
    </Location>
    <Location "/store/META-INF/">
        AllowOverride None
        deny from all
    </Location>
</VirtualHost>

---- server.xml ----

<Host name="host1">
    <Context path=""
             docBase="/virtual/host1/www/htdocs"
             debug="0" />
</Host>

<Host name="host2">
    <Context path=""
             docBase="/virtual/host2/www/htdocs"
             debug="0" />
</Host>

What exactly is the difference between 'path' and 'docBase'? And does the
'home' attribute of the ContextManager only apply for non-virtual hosts?

TIA for any help!
Mike


Mime
View raw message