Dear Wiki user, You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.
The following page has been changed by slive: http://wiki.apache.org/httpd/CouldNotDetermineServerName The comment on the change is: Clarify the solution ------------------------------------------------------------------------------ This warning indicates that apache was unable to determine its own name. The server needs to know its own name under certain circumstances in order to generate self-referential redirects. When {{{UseCanonicalName}}} is {{{off}}}, however, the server will use the name supplied by the client, so this warning can be safely ignored. - To eliminate the warning, make sure you have '''!ServerName''' defined in your main apache configuration file (typically httpd.conf). + To eliminate the warning, make sure you have fully-qualified '''!ServerName''' defined in your main apache configuration file (typically httpd.conf). Examples: - {{{ServerName foo.com + {{{ServerName foo.example.com }}} {{{ServerName 111.111.111.111 }}} - {{{NameVirtualHost *:80 - <VirtualHost *:80> - ServerName foo.com - ... - </VirtualHost> - }}} + Even if all requests are served by virtual hosts, you must still have a {{{ServerName}}} defined in the main configuration file outside the {{{VirtualHost}}} sections. + + ''The presence of this error message also indicates that Apache httpd was unable to obtain a fully-qualified hostname by doing a reverse lookup on your server's IP address. While the above instructions will get rid of the warning in any case, it is also a good idea to fix your name resolution so that this reverse mapping works. For example, - Additionally, if you're using a Debian-based distro, you will want to edit your '''/etc/hosts''' file and add a valid domain (localhost.localdomain) to the 127.0.0.1 line. + on many unix systems, you will want to edit your '''/etc/hosts''' file and add a valid domain (localhost.localdomain) to the 127.0.0.1 line:'' Example: - {{{127.0.0.1 localhost.localdomain localhost yourmachine.example.com + {{{127.0.0.1 localhost.localdomain localhost foo.example.com }}}
