linux - httpd : Could not reliably determine the server's fully qualified domain name, 使用 127.0.0.1 作为 ServerName

标签 linux apache centos

我尝试在 CentOS 5.0 上重新启动我的 Apache 服务器并收到以下消息:

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

这是 /etc/hosts 文件:

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

这是 /etc/sysconfig/network 文件:

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server4-245

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

ServerName localhost

但是,当我重新启动 Apache 时,我仍然收到第一条错误消息。

最佳答案

如果文件夹 /etc/apache2 中没有 httpd.conf,则应该有 apache2.conf - 只需添加:

ServerName localhost

然后重启apache2服务。

关于linux - httpd : Could not reliably determine the server's fully qualified domain name, 使用 127.0.0.1 作为 ServerName,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9541460/

相关文章:

php - svn export 使我的页面空白

linux - Apache <Directory> 不适用于子目录

linux - 如何在没有root用户的情况下在centOS上安装rabbitmq和erlang?

python-3.x - 如何在 AWS EC2 Centos 上使用 Terraform 修复用 python 3 编写的简单 http 服务器

linux - gui 和 ssh session 的不同 bash 别名

c - 在 C 中删除原始文件的符号链接(symbolic link)

linux - 制作 glib : . ./libtool: line 6003: cd: (libdir): No such file or directory

linux - 公共(public) Samba 共享配置 - 不可写?

mysql - 如何找到Sqoop导入导出的mysql的主机名和端口号?

java - JNA 3.0.9 .so(64bit) 加载引用另一个 .so(64bit)