CouldNotDetermineServerName
时间:2007-07-11 来源:opbsder
Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
This is a warning that occurs when starting up apache. This can be seen in the error log and in the shell terminal output if using the command line to start/restart apache (apachectl start, apachectl restart).
(这个警告在apache启动的时候出现。可以在error.log中看到,如果是在字符界面下启动apache也会看到这个警告。)
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.
(这个警告表明,apache不能决定他的名字。在某些情况下,服务器需要知道他自己的名字来产生自我重定向。如果UseCanonicalName设置为off,服务器将使用客户端提供的名字,所以这个警告可以被忽略)
To eliminate the warning, make sure you have ServerName defined in your main apache configuration file (typically httpd.conf).
(要解决这个问题,请确定在你的httpd.conf中配置了ServerName)
Examples:
ServerName foo.com
ServerName 111.111.111.111
NameVirtualHost *:80 <VirtualHost *:80> ServerName foo.com ... </VirtualHost>
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.
Example:
127.0.0.1 localhost.localdomain localhost yourmachine.example.com