I did something similar with mine. I have a server on an intranet. I have my host file setup with names that point to the same ip address. apache is setup with virtual host, each virtual host represents a name (dev1, dev2, qa, stage) something like that. worker2.properties file has those names defined seperatly, server.xml has those names in each host area (they are setup as seperate tomcat instances).

From: Bill Winspur <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Virtual Hosting Questions
Date: Wed, 17 Nov 2004 11:52:45 -0700

I need to set up a few virtual hosts for a development project, and being new to Tomcat virtual hosts, have a couple of questions:
-------------------
1. In development, the clients and tomcat will be on an intranet. I plan to use the hosts files of the client and tomcat boxes to map domain names to IP addresses, thereby preempting invocation of DNS, and thus exposure of our product-specific domain names to the Internet at-large, until the site is deployed publicly.


Question 1: Is this hosts-file approach feasible? Does tomcat care HOW domain names
are mapped to IP addresses?
------------------
The following fragment is extracted from conf/server.xml of the the tomcat distribution:


<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"
             timestamp="true"/>
</Host>

Question 2: Why is the host named localhost? From the documentation, I expected that only URL's of the form http://localhost:8080/... would be handled by this virtual host, but it seems to handle any URL's that map to the IP and port of the real host that tomcat serves.
-------------------
Question 3: How would one configure a 'local' virtual host, i.e. a host visible only on the box that runs tomcat?
-------------------
Thanks,
Bill



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




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



Reply via email to