tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Huang Hai - ES/BJ <Hai.Hu...@Sun.COM>
Subject Virtual Hosting with Appache/Tomcat
Date Sat, 13 Apr 2002 08:04:16 GMT
Dear Sir,

Stupid question from me,

I am using Apache 1.3.20 and Tomcat 3.2.3. It can work without virtual hosting 
or just apache virtual hosting.( I am using same IP, different port), but I can 
not config Tomcat hosting.

Please note my application is not put under TOMCAT_HOME/webapps, but 
/myapplication/server1 and /myapplication/server2.

Here is the configuration file relative to the virtual hosting,

Apache
======
NameVirtualHost MyServer_IP

<VirtualHost MyServer_IP:80>
    DocumentRoot /myapplication/server1
    ServerName MyServer_Name
    JkMount /*.jsp ajp12
</VirtualHost>

<VirtualHost MyServer_IP:81>
    DocumentRoot /myapplication/server2
    ServerName MyServer_Name
    JkMount /fs/*.jsp ajp12
</VirtualHost>

Tomcat
======
        <Host name="MyServer_Name:80">
           <Context path="/"
                 docBase="/myapplication/server1"
                 debug="0"
                 reloadable="true" >
        </Context>
        </Host>

        <Host name="MyServer_Name:82">
           <Context path="/fs"
                 docBase="/myapplication/server2/fs"
                 debug="0"
                 reloadable="true" >
        </Context>
        </Host>

When I browse my jsp file and I got an error message,
Not Found (404)

I checked the jsp log and found that the jsp enginee tried to find the jsp file 
from 
RealPath: /usr/tomcat/webapps/ROOT/my.jsp

if I move the context configuration from the <Host> directives, it can work 
without virtual hosting.

Thanks for your help in advance. 
Hai


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message