You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Wes Byers <we...@myrealpage.com> on 2002/05/11 01:39:04 UTC
Default Document Problem! JKMount /* OR JKMount /*.jsp
I am trying to set up virtual hosting with Apache and Tomcat. I wish to
direct each of the domains to a separate directory in the same web-app in
Tomcat. In addition, I wish to set up default documents (welcome files) that
may or may not be the same for each host.
Currently, I can only achieve this effect using "JKMount /*", but wish to
use "JKMount /*.jsp" to make Apache serve the static content. When I use
"JKMount /*.jsp", I get an error message from Apache saying "no permissions
to view directory contents or no default document has been assigned (403)".
However, when I change the JKMount to /*, the default document, index.jsp,
is served.
Note: Apache 2.0.35, Tomcat 4.0.3, mod_jk, Windows 2000, jdk1.4
-------------------------------
server.xml -------------------------------------
[...]
<Service name="Tomcat-Standalone">
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0" connectionTimeout="0" />
<Engine name="Standalone" defaultHost="www.propertymart.com" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="www.domain1.com" debug="0"
appBase="webapps/ROOT/powerpages/Canada/domain1" unpackWARs="true">
<Context path="" docBase="" debug="0"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="d1_log." suffix=".txt"
timestamp="true"/>
</Host>
<Host name="www.domain2.com" debug="0"
appBase="webapps/ROOT/powerpages/Canada/domain2" unpackWARs="true">
<Context path="" docBase="" debug="0"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="d2_log." suffix=".txt"
timestamp="true"/>
</Host>
<Host name="www.noserver.com" debug="0" appBase="webapps"
unpackWARs="true" reloadable="true" >
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
</Host>
[...]
----------------------------------------------------------------------------
-----
-------------------------------
httpd.conf -------------------------------------
[...]
DirectoryIndex index.jsp index.html
NameVirtualHost *
<VirtualHost *>
ServerAdmin admin@domain1.com
DocumentRoot C:\Apache2\tomcat4\webapps\ROOT\powerpages\Canada\domain1
<Directory "C:\Apache2\tomcat4\webapps\ROOT\powerpages\Canada\domain1">
Options Indexes
</Directory>
ServerName www.domain1.com
</VirtualHost>
<VirtualHost *>
ServerAdmin admin@domain2.com
DocumentRoot C:\Apache2\tomcat4\webapps\ROOT\powerpages\Canada\domain2
<Directory "C:\Apache2\tomcat4\webapps\ROOT\powerpages\Canada\domain2">
Options Indexes
</Directory>
ServerName www.domain2.com
</VirtualHost>
<VirtualHost *>
ServerAdmin admin@noserver.com
DocumentRoot C:\Apache2\tomcat4\webapps\ROOT
ServerName www.noserver.com
</VirtualHost>
JkWorkersFile C:\Apache2\conf\workers.properties
JkLogFile C:\Apache2\logs\mod_jk.log
JkLogLevel error
JkMount /* ajp13
----------------------------------------------------------------------------
-----
Thanks!
Wes
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>