httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

前端 未结 12 1710
悲&欢浪女
悲&欢浪女 2020-12-04 05:44

I tried to restart my Apache server on CentOS 5.0 and got this message:

httpd: Could not reliably determine the server\'s fully qualified domain name,

12条回答
  •  离开以前
    2020-12-04 06:28

    Your hosts file does not include a valid FQDN, nor is localhost an FQDN. An FQDN must include a hostname part, as well as a domain name part. For example, the following is a valid FQDN:

    host.server4-245.com
    

    Choose an FQDN and include it both in your /etc/hosts file on both the IPv4 and IPv6 addresses you are using (in your case, localhost or 127.0.0.1), and change your ServerName in your httpd configuration to match.

    /etc/hosts:

    127.0.0.1    localhost.localdomain localhost host.server4-245.com
    ::1          localhost.localdomain localhost host.server4-245.com
    

    httpd.conf:

    ServerName host.server4-245.com
    

提交回复
热议问题