tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Wynter" <da...@roamware.co.uk>
Subject RE: 2 VirtualHosts same IP address and port on Tomcat not working
Date Fri, 22 Aug 2003 09:53:56 GMT
Hi,

I have read dozens of archived posts on virtualhost. I have distilled my
httpd.conf and server.xml back to what seems to be the recommended approach,
see below. But now I can see no sites on any URL. I have a suspicous "End
event threw exception" in the catalina.out log, which suggests a problem
with server.xml, but reading it I cannot see any illegal XML, so assume it
is a configuration value error. At the end of the exception it also has
"...IllegalArguementException: Servlet mapping specifies an unknown servlet
name rwsite" which suggests it doesn't like my second Host configuration.
But I copied and pasted it from a posted version that worked and just
changed the appBase and servername to appropriate values?

In my error_log I get 2 types of errors:
1.  "Directory Index forbidden by rule:
/usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite" - there is that same
troublesome rwsite again.
2. "File does not exist:
/usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite/servlet" it's not a file but
a directory? and I get "File does not exist:
/usr/local/jakarta-tomcat-4.1.12/webapp2/se/servlet, referer:
http://www.stpenable.com/se/servlet/se/template/solutions%2Cmdmanage.vm"
which is real.

server.xml hosts section-------------------------->

     <!-- Define the default virtual host -->
      <Host name="www.stpenable.com" debug="0"
appBase="/usr/local/jakarta-tomcat-4.1.12/webapp2"
       unpackWARs="true" autoDeploy="true">

       <Alias>localhost</Alias>

        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="stpenable_access_log."
suffix=".txt"
                 pattern="common"/>

        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="stpenable_log." suffix=".txt"
	        timestamp="true"/>

        <Context path=""
docBase="/usr/local/jakarta-tomcat-4.1.12/webapp2/se" debug="1"/>
        <Context path="/rwtransform"
docBase="/usr/local/jakarta-tomcat-4.1.12/webapp2/rwtransform" debug="1"/>

      </Host>

      <Host name="www.roamware.co.uk" debug="0"
appBase="/usr/local/jakarta-tomcat-4.1.12/webapp1"
                   unpackWARs="true" autoDeploy="true">

		<Context path="" docBase="" debug="1"/>

		<Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="roamware_access_log."
suffix=".txt"
                 pattern="common" resolveHosts="false"/>
      </Host>

httpd.conf section-------------------------->

NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#


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

JkLogLevel debug

<VirtualHost *>
    ServerName www.stpenable.com

    #################### www.stpenable.com:/se ####################

    ServerAlias localhost
    # Static files
    DocumentRoot /usr/local/jakarta-tomcat-4.1.12/webapp2/se
    Alias /se /usr/local/jakarta-tomcat-4.1.12/webapp2/se

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

    JkMount /usr/local/jakarta-tomcat-4.1.12/webapp2/se/*  ajp13

    #################### www.stpenable.com:/rwtransform ####################

    Alias /rwsite /usr/local/jakarta-tomcat-4.1.12/webapp2/rwtransform

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

    JkMount /usr/local/jakarta-tomcat-4.1.12/webapp2/rwtransform/*  ajp13

</VirtualHost>

<VirtualHost *>
    ServerName www.roamware.co.uk

    #################### www.roamware.co.uk:/rwsite ####################

    # Static files
    DocumentRoot /usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite

    Alias /rwsite /usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite

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

    JkMount /usr/local/jakarta-tomcat-4.1.12/webapp1/rwsite/*  ajp13

</VirtualHost>

I think I have tried everything I can with this. Any further suggestions?
Seems like John Turner is the only one able to answer these questions.

Regards

David


Mime
View raw message