tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@UNISYS.com>
Subject RE: Virtual Hosting Questions
Date Wed, 17 Nov 2004 19:56:40 GMT
> From: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> Subject: RE: Virtual Hosting Questions
> 
> It's more of a Java networking question that Tomcat question.  I'm not
> sure how java's InetAddress class likes hosts files: my guess 
> is they're ignored.

Using the hosts file is the responsibility of the underlying TCP/IP stack, not the JRE. This
is normally automatic, but may have to be configured on some platforms.

> >Question 2: Why is the host named localhost?
> 
> Localhost is just the default name.  You can substitute any string in
> there, and have as many Hosts as you want inside the Engine, but the
> Host name must be unique within the Engine.

I seem to recall seeing code in some component of Tomcat that explicitly treated the string
"localhost" as 0.0.0.0 (rather than the normal value of 127.0.0.1), just for this one configuration
entry.  This allows listening on all IP addresses configured for the TCP/IP stack.

> Question 3: How would one configure a 'local' virtual host, i.e. a host
> visible only on the box that runs tomcat?

Haven't tried it, but putting 127.0.0.1 in there explicitly should prevent listening for connection
requrests from the network.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message