tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "29djeo" <>
Subject virtual hosting? anyone succeed?
Date Sat, 20 Dec 2003 18:34:03 GMT
Has anyone succeeded in getting tomcat 5.0.16 set up for virtual hosting without using apache
as a front end?

I'm trying to get one instance of tomcat to serve two domains on the same machine.

I have added two Host sections to server.xml and I see the following behavior when I access
the sites from a browser running on the same host as tomcat:

http://localhost:8080 - default context - blank page - blank page
http://mydomain1:8080 - correctly runs the mydomain1 context
http://mydomain2:8080 - correctly runs the mydomain2 context

how do I get and to show the correct contexts?

from another host on my network the only context I can load is http://hostname:8080 to see
the default context.  All other contexts like and
result in an "action cancelled" from ineternet explorer.

Here is an excerpt from server.xml:

   <Service name="Catalina">
      <Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
      <Connector port="8009" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3"/>
      <Engine name="Catalina" defaultHost="localhost" debug="0">
         <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log."
suffix=".txt" timestamp="true"/>
         <Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/>
         <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
            <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
 prefix="localhost_log." suffix=".txt"/>
         <Host name="" debug="0" appBase="webapps" unpackWARs="true">
            <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
prefix="mydomain1." suffix=".log" timestamp="true"/>
            <Context path="" docBase="mydomain1" debug="0" reloadable="true"/>
         <Host name="" debug="0" appBase="webapps" unpackWARs="true">
            <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
prefix="mydomain2." suffix=".log" timestamp="true"/>
            <Context path="" docBase="mydomain2" debug="0" reloadable="true"/>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message