httpd的:无法可靠地确定了服务器的完全合格的域名,使用ServerName的127.0.0.1 [英] httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

查看:1716
本文介绍了httpd的:无法可靠地确定了服务器的完全合格的域名,使用ServerName的127.0.0.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CentOS的5.0

CentOS 5.0

我试图重新启动我的Apache服务器,并得到这个messeage

I tried to restart my apache server and got this messeage

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

下面是/ etc / host文件

here is /etc/host file

127.0.0.1   server4-245 server4-245.com localhost.localdomain localhost
::1     localhost6.localdomain6 localhost6

下面是/ etc / sysconfig / network文件

here is /etc/sysconfig/network file

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server4-245

我也有这个在Apache的httpd.conf文件

I also have this in apache httpd.conf file

ServerName localhost

不过,我还是当我重新启动Apache得到的第一个错误messeage。

However, I still get the first error messeage when I restart the apache.

推荐答案

您hosts文件不包含有效的FQDN,也不是本地主机的FQDN。一个FQDN必须包含主机名的一部分,以及域名的一部分。例如,以下是有效的FQDN:

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

选择一个FQDN,包括它无论是在你的 / etc / hosts中对IPv4和IPv6的文件地址使用的是(在你的情况,本地主机 127.0.0.1 ),并改变你的服务器名称在你的httpd配置匹配。

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文件:

/etc/hosts:

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

httpd.conf中:

httpd.conf:

ServerName host.server4-245.com

这篇关于httpd的:无法可靠地确定了服务器的完全合格的域名,使用ServerName的127.0.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆