apache启动失败Failed to start The Apache HTTP Server.

目录

【错误收集】

【错误分析】

【解决办法】

【运行结果】


【错误收集】

● httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

Active: failed (Result: exit-code) since 四 2025-10-30 21:36:41 CST; 7s ago

Docs: man:httpd(8)

man:apachectl(8)

Process: 31063 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

Main PID: 31063 (code=exited, status=1/FAILURE)

10月 30 21:36:41 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...

10月 30 21:36:41 localhost.localdomain httpd[31063]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set ...his message

10月 30 21:36:41 localhost.localdomain httpd[31063]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

10月 30 21:36:41 localhost.localdomain httpd[31063]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

10月 30 21:36:41 localhost.localdomain httpd[31063]: no listening sockets available, shutting down

10月 30 21:36:41 localhost.localdomain httpd[31063]: AH00015: Unable to open logs

10月 30 21:36:41 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE

10月 30 21:36:41 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.

10月 30 21:36:41 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.

10月 30 21:36:41 localhost.localdomain systemd[1]: httpd.service failed.

【错误分析】

80端口被占用了

【解决办法】

sudo netstat -tlnp | grep :80

杀死80端口进程

docker占用80端口了

停止运行容器

复制代码
docker stop 411013ae0e96

【运行结果】

启动apache

复制代码
sudo systemctl start httpd

systemctl status httpd.service

root@localhost tmp\]# systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: active (running) since 四 2025-10-30 21:44:00 CST; 9s ago Docs: man:httpd(8) man:apachectl(8) Main PID: 41074 (httpd) Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" Tasks: 6 Memory: 6.4M CGroup: /system.slice/httpd.service ├─41074 /usr/sbin/httpd -DFOREGROUND ├─41076 /usr/sbin/httpd -DFOREGROUND ├─41077 /usr/sbin/httpd -DFOREGROUND ├─41078 /usr/sbin/httpd -DFOREGROUND ├─41079 /usr/sbin/httpd -DFOREGROUND └─41080 /usr/sbin/httpd -DFOREGROUND 10月 30 21:44:00 localhost.localdomain systemd\[1\]: Starting The Apache HTTP Server... 10月 30 21:44:00 localhost.localdomain httpd\[41074\]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set ...his message 10月 30 21:44:00 localhost.localdomain systemd\[1\]: Started The Apache HTTP Server. Hint: Some lines were ellipsized, use -l to show in full.

相关推荐
莫爷3 小时前
JSON 性能优化实战:大数据量 JSON 的处理技巧
性能优化·json·apache
D愿你归来仍是少年4 小时前
Flink 并行度变更时 RocksDB 状态迁移的关键机制与原理
大数据·flink·apache
User_芊芊君子11 小时前
大数据时代时序数据库选型指南:Apache IoTDB技术解析与实践建议
大数据·apache·时序数据库
SeaTunnel12 小时前
Apache SeaTunnel 提速不难,JVM 参数这样调
jvm·apache
小马爱打代码12 小时前
Apache HttpClient 核心设计模式详解
设计模式·apache
想你依然心痛12 小时前
大数据时代时序数据库选型指南:Apache IoTDB 如何成为工业物联网的“数据底座“
大数据·apache·时序数据库
程序 代码狂人2 天前
Apache旗下产品有哪些
apache
地球@+jdhb442 天前
快手私信自动回复卡片一键生成后台制作金钥匙跳转卡片代理后台制作|云雀外链
apache
D愿你归来仍是少年2 天前
Apache Spark 第 6 章 附加篇:Tungsten 引擎深度解析
大数据·spark·apache
D愿你归来仍是少年2 天前
Apache Flink Checkpoint 与 Chandy-Lamport 算法深度解析
算法·flink·apache