Actually I would just as soon pull index.jsp instead. I tried setting Document Roots myself,
including my own mod_jk.conf from another directory and it works for the first, and the
second ignores its DocumentRoot.
Here is my mod_jk.conf

Turner, John wrote:

index.html doesn't go to Tomcat, so you would need to set the DocumentRoot
in httpd.conf for Apache to find that file.

Can you add your second host, start Tomcat, and then post the resulting
mod_jk.conf file? That would give us an idea of what Apache is being told.

John


-----Original Message-----
From: Adrian Damn it!
To: [EMAIL PROTECTED]
Sent: 1/6/03 6:00 PM
Subject: Virtual Host + Tomcat + Apache

Having trouble with the vhosts with mod_jk.
I can`t seem to get http://stafford.com/index.html to show up unless I
set the DocumentRoot in the VirtualHost directive to /usr/local/tomcat/webapps/stafford.
But when I add an additional Virtual host it pulls the same
DocumentRoot.



<Host name="stafford.com" debug="0" appBase="webapps"
unpackWARs="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="stafford." suffix=".log" timestamp="true"/>
<Context path="" docBase="stafford" debug="0"
reloadable="true"/>
<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true"
forwardAll="false" modJk="/usr/local/apache/libexec/mod_jk.so"
workersConfig="/usr/local/tomcat/conf/jk/workers.properties" />


</Host>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>





########## Auto generated on Mon Jan 06 18:15:42 EST 2003##########

<IfModule !mod_jk.c>
  LoadModule jk_module libexec/mod_jk.so
</IfModule>

JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat/logs/mod_jk.log"

JkLogLevel emerg



<VirtualHost schulerhawaii.com>
    ServerName schulerhawaii.com

    #################### schulerhawaii.com:/examples ####################

    # Static files 
    Alias /examples "/usr/local/tomcat/webapps/examples"

    <Directory "/usr/local/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13

    #################### schulerhawaii.com:/hawaii ####################

    # Static files 
    Alias /hawaii "/usr/local/tomcat/webapps/hawaii"

    <Directory "/usr/local/tomcat/webapps/hawaii">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/hawaii/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/hawaii/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /hawaii/*.jsp  ajp13

    #################### schulerhawaii.com:/stafford ####################

    # Static files 
    Alias /stafford "/usr/local/tomcat/webapps/stafford"

    <Directory "/usr/local/tomcat/webapps/stafford">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stafford/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stafford/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /stafford/*.jsp  ajp13

    #################### schulerhawaii.com:/webdav ####################

    # Static files 
    Alias /webdav "/usr/local/tomcat/webapps/webdav"

    <Directory "/usr/local/tomcat/webapps/webdav">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp index.html index.htm 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/webdav/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/webdav/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /webdav/*.jsp  ajp13

    #################### schulerhawaii.com:/tomcat-docs ####################

    # Static files 
    Alias /tomcat-docs "/usr/local/tomcat/webapps/tomcat-docs"

    <Directory "/usr/local/tomcat/webapps/tomcat-docs">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/tomcat-docs/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/tomcat-docs/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /tomcat-docs/*.jsp  ajp13

    #################### schulerhawaii.com:/admin ####################

    # Static files 
    Alias /admin "/usr/local/tomcat/webapps/../server/webapps/admin"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/admin">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/admin/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/admin/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /admin/j_security_check  ajp13
    JkMount /admin/*.jsp  ajp13
    JkMount /admin/*.do  ajp13

    #################### schulerhawaii.com:/manager ####################

    # Static files 
    Alias /manager "/usr/local/tomcat/webapps/../server/webapps/manager"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/html/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

<VirtualHost staffordhomes.com>
    ServerName staffordhomes.com

    #################### staffordhomes.com:/examples ####################

    # Static files 
    Alias /examples "/usr/local/tomcat/webapps/examples"

    <Directory "/usr/local/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13

    #################### staffordhomes.com:/hawaii ####################

    # Static files 
    Alias /hawaii "/usr/local/tomcat/webapps/hawaii"

    <Directory "/usr/local/tomcat/webapps/hawaii">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/hawaii/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/hawaii/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /hawaii/*.jsp  ajp13

    #################### staffordhomes.com:/stafford ####################

    # Static files 
    Alias / "/usr/local/tomcat/webapps/stafford"

    <Directory "/usr/local/tomcat/webapps/stafford">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stafford/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stafford/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /*.jsp  ajp13

    #################### staffordhomes.com:/webdav ####################

    # Static files 
    Alias /webdav "/usr/local/tomcat/webapps/webdav"

    <Directory "/usr/local/tomcat/webapps/webdav">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp index.html index.htm 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/webdav/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/webdav/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /webdav/*.jsp  ajp13

    #################### staffordhomes.com:/tomcat-docs ####################

    # Static files 
    Alias /tomcat-docs "/usr/local/tomcat/webapps/tomcat-docs"

    <Directory "/usr/local/tomcat/webapps/tomcat-docs">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/tomcat-docs/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/tomcat-docs/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /tomcat-docs/*.jsp  ajp13

    #################### staffordhomes.com:/admin ####################

    # Static files 
    Alias /admin "/usr/local/tomcat/webapps/../server/webapps/admin"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/admin">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/admin/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/admin/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /admin/j_security_check  ajp13
    JkMount /admin/*.jsp  ajp13
    JkMount /admin/*.do  ajp13

    #################### staffordhomes.com:/manager ####################

    # Static files 
    Alias /manager "/usr/local/tomcat/webapps/../server/webapps/manager"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/html/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

<VirtualHost localhost>
    ServerName localhost

    #################### localhost:/examples ####################

    # Static files 
    Alias /examples "/usr/local/tomcat/webapps/examples"

    <Directory "/usr/local/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13

    #################### localhost:/hawaii ####################

    # Static files 
    Alias /hawaii "/usr/local/tomcat/webapps/hawaii"

    <Directory "/usr/local/tomcat/webapps/hawaii">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/hawaii/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/hawaii/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /hawaii/*.jsp  ajp13

    #################### localhost:/stafford ####################

    # Static files 
    Alias /stafford "/usr/local/tomcat/webapps/stafford"

    <Directory "/usr/local/tomcat/webapps/stafford">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/stafford/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/stafford/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /stafford/*.jsp  ajp13

    #################### localhost:/webdav ####################

    # Static files 
    Alias /webdav "/usr/local/tomcat/webapps/webdav"

    <Directory "/usr/local/tomcat/webapps/webdav">
        Options Indexes FollowSymLinks
        DirectoryIndex index.jsp index.html index.htm 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/webdav/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/webdav/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /webdav/*.jsp  ajp13

    #################### localhost:/tomcat-docs ####################

    # Static files 
    Alias /tomcat-docs "/usr/local/tomcat/webapps/tomcat-docs"

    <Directory "/usr/local/tomcat/webapps/tomcat-docs">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/tomcat-docs/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/tomcat-docs/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /tomcat-docs/*.jsp  ajp13

    #################### localhost:/admin ####################

    # Static files 
    Alias /admin "/usr/local/tomcat/webapps/../server/webapps/admin"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/admin">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/admin/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/admin/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /admin/j_security_check  ajp13
    JkMount /admin/*.jsp  ajp13
    JkMount /admin/*.do  ajp13

    #################### localhost:/manager ####################

    # Static files 
    Alias /manager "/usr/local/tomcat/webapps/../server/webapps/manager"

    <Directory "/usr/local/tomcat/webapps/../server/webapps/manager">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp 
    </Directory>


    # Deny direct access to WEB-INF and META-INF
    #
    <Location "/manager/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/manager/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /manager/*.jsp  ajp13
    JkMount /manager/html/*  ajp13
    JkMount /manager/*  ajp13
</VirtualHost>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to