Bug 52302

Summary: Better documentation of how server name is determined if ServerName directive is not given
Product: Apache httpd-2 Reporter: Dale Worley <worley>
Component: DocumentationAssignee: HTTP Server Documentation List <docs>
Status: RESOLVED LATER    
Severity: enhancement Keywords: MassUpdate
Priority: P2    
Version: 2.2.17   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

Description Dale Worley 2011-12-07 17:42:42 UTC
Our configuration does not provide a ServerName directive.  This is not the best practice, but it appears to be allowed and supported.  In certain situations, the server name that Apache guesses is not correct, leading to the problems described in bug report 52301.

We would be better able to avoid problems if the algorithm used by Apache to determine the server name were clearly specified.  However, the description is quite vague.  In http://httpd.apache.org/docs/2.0/mod/core.html#servername (modified Mon 03 Jan 2011 08:02:54 AM EST):

"If no ServerName is specified, then the server attempts to deduce the hostname by performing a reverse lookup on the IP address."

However, the phrase "the IP address" is ambiguous (as the host almost certainly has both a loopback IP address and a network interface IP address, and may have many IP addresses), as is the description "a reverse lookup" (evidence suggests that Apache looks in /etc/hosts before querying for DNS PTR records, but it could easily have been done in the reverse order).

If this sentence was expanded to give an accurate, unambiguous description of the method Apache uses to determine the "default" server name, it would be quite helpful.
Comment 1 William A. Rowe Jr. 2018-11-07 21:09:06 UTC
Please help us to refine our list of open and current defects; this is a mass update of old and inactive Bugzilla reports which reflect user error, already resolved defects, and still-existing defects in httpd.

As repeatedly announced, the Apache HTTP Server Project has discontinued all development and patch review of the 2.2.x series of releases. The final release 2.2.34 was published in July 2017, and no further evaluation of bug reports or security risks will be considered or published for 2.2.x releases. All reports older than 2.4.x have been updated to status RESOLVED/LATER; no further action is expected unless the report still applies to a current version of httpd.

If your report represented a question or confusion about how to use an httpd feature, an unexpected server behavior, problems building or installing httpd, or working with an external component (a third party module, browser etc.) we ask you to start by bringing your question to the User Support and Discussion mailing list, see [https://httpd.apache.org/lists.html#http-users] for details. Include a link to this Bugzilla report for completeness with your question.

If your report was clearly a defect in httpd or a feature request, we ask that you retest using a modern httpd release (2.4.33 or later) released in the past year. If it can be reproduced, please reopen this bug and change the Version field above to the httpd version you have reconfirmed with.

Your help in identifying defects or enhancements still applicable to the current httpd server software release is greatly appreciated.