Apache Httpd 安装 AH00558错误

安装完成 Httpd 后出现错误:

[root@vps-f2a02f66 vhosts]# systemctl status httpd.service
 httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
       └─php-fpm.conf
   Active: failed (Result: exit-code) since Sun 2020-05-24 16:56:11 UTC; 12min ago
 Docs: man:httpd.service(8)
  Process: 17168 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
 Main PID: 17168 (code=exited, status=1/FAILURE)
   Status: "Reading configuration..."
  CPU: 44ms

May 24 16:56:11 vps-f2a02f66.vps.ovh.ca systemd[1]: Starting The Apache HTTP Server...
May 24 16:56:11 vps-f2a02f66.vps.ovh.ca httpd[17168]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using vps-f2a02f66.vps.ovh.ca. Set the 'ServerName' directive globally to suppress this >
May 24 16:56:11 vps-f2a02f66.vps.ovh.ca systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
May 24 16:56:11 vps-f2a02f66.vps.ovh.ca systemd[1]: httpd.service: Failed with result 'exit-code'.
May 24 16:56:11 vps-f2a02f66.vps.ovh.ca systemd[1]: Failed to start The Apache HTTP Server.

服务器的错误提示信息如下:

这是因为你的服务器没设置域名。

你可以设置本地域名后解决这个问题。

编辑 vi /etc/httpd/conf/httpd.conf 文件。

然后修改 ServerName localhost:80 为 localhost 或者取消注释这行。

然后重启服务器后,就可以修正上面的错误。

posted @   huyuchengus  阅读(726)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)
历史上的今天:
2019-05-25 Angular 英雄编辑器
2018-05-25 Confluence 6 数据库问题解除
2018-05-25 Confluence 6 数据库连接方式
2018-05-25 Confluence 6 关于嵌入的 H2 数据库
2018-05-25 Confluence 6 选择一个外部数据库
2018-05-25 Confluence 6 服务器的许可证信息
点击右上角即可分享
微信分享提示