httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@lnd.com>
Subject RE: confused about new ServerName logic
Date Wed, 21 Jun 2000 18:16:57 GMT
> From: Jeff Trawick [mailto:trawick@ibm.net]
> Sent: Wednesday, June 21, 2000 11:53 AM
> 
> I thought the existing text was awkward and suggested a new one

The first message certainly can use massaging, yea.  The second
one as well, as long as we don't imply we 'set' something that
was never really changed in httpd.conf.

> but the main thing I wanted to understand is the condition when 
> we printed such text.

Fair enough, let's continue.
 
> > Your {} block is entirely wrong.  You will only display 
> messages if we
> > 'assume' a localhost ip?  What about the fool with 15 dns 
> aliases who
> > can't understand why their server responds with the name 
> pigsfeet.ugh,
> > and can't seem to change it (no idea why...)
> 
> I don't think it is so nice to issue an error message on the console
> for a situation we do not know to be in error and which has been
> happily accepted by Apache with no complaints for a long period of
> time.  If we have to assume 127.0.0.1, yes that is a configuration
> almost definitely in error and it should be an error message on the
> console like you have it.  If gethostname() and gethostbyname()
> worked, however, then I don't think we should complain so loudly.  An
> info or warning message in the log should suffice.  I would *guess*
> that there are great numbers of existing apache installations with no
> ServerName but a valid DNS setup and hence no problems.

Ok... issue one, this patch was already accepted into 1.3.13, and 2.0
is a new beast, so we don't have to follow the 'it worked this way
before' arguments if we are improving the product.  But on to the Q...

The fdqn function is called if the user doesn't specify ServerName.
Now, the patch gave them a message telling them what we uncovered.
That could be, in order...

  * A dotted name.  Not necessarily the 'right' name, but a dotted name.
  * An IP address in dot notation.  Most likely a good one, but not a name.
  * The system loopback IP in dot notation, 127.0.0.1

If we had an undotted name (local intranet, perhaps), then all is lost
for the user.  They aught to know that their site isn't called pigsfeet
(dot nothing), but is called 10.15.15.1.  Not very nice of us, but then
again, we wouldn't want to name the server pigsfeet if they are also
pigsfeet.com now, would we?

Without touching more than the single function, we could only detect
conditions one and two as a unit, not by case, for the message.  Therefore
we print the name in any case, and the user can ignore, add or even 
(gasp!) correct the ServerName, as appropriate.

We document in httpd.conf that they should fill this in.  Providing a
warning that they haven't isn't bad, IMHO.

Bill

Mime
View raw message