linux - httpd : Could not reliably determine the s

我尝试在 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/

相关文章:

python - 如何重命名 conda 环境?

linux - 强制卸载 NFS 挂载的目录

python - 如何从生成器中只选择一项?

python - 如何覆盖 Python 中的 [] 运算符?

linux - 解压目录中的所有文件

linux - 对制表符分隔的文件进行排序

python - 您如何以编程方式设置属性?

python - django 导入错误 - 没有名为 core.management 的模块

linux - ld 找不到现有的库

linux - Linux中的缓冲区和高速缓存有什么区别?