Edward Ruggeri wrote:
On Sat, Sep 26, 2009 at 6:21 PM, Norman Peelman <npeel...@cfl.rr.com> wrote:
Apache (linux/windows) will check the 'hosts' file first and then do DNS
lookups when no matches are found. I don't understand why your not worried
about why it needs it but you are worried about how it gets it. The main
server needs a name just like the vhosts, for the very reasons you yourself
gave.

Excuse me: DNS associates IP's to names.  I understand that apache
wants a host name.  But it won't find it through DNS.

When I say I'm not worried about Apache finding a host name, it's
because I know how to configure hostname and /etc/hosts (or just
specify ServerName) so that Apache gets the correct hostname.  I can
easily make the error go away.  What I'm worried about is the
documentation claim that Apache needs to do a DNS lookup to find an IP
address.  I don't understand what this IP could possibly be used for
(though the documentation seems to think that's obvious?).

So, let me restate my two questions:
(1) Does Apache really ever try to do a lookup (either in /etc/hosts
or DNS) for an IP address, as seems to be implied by the
documentation?
(2) Why would it?  That is, what would the IP address be used for.

I also reference the documentation again, below:

"The addition of name-based virtual host support in Apache 1.1
requires Apache to know the IP address(es) of the host that httpd is
running on. To get this address it uses either the global ServerName
(if present) or calls the C function gethostname (which should return
the same as typing "hostname" at the command prompt). Then it performs
a DNS lookup on this address. At present there is no way to avoid this
lookup."




Ok, so http traffic is controlled by ip addresses not domain names. I don't believe it needs to do a DNS lookup if the hosts file contains what it's looking for.


--
Norman Registered Linux user #461062
-Have you been to www.apache.org yet?-

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to