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 systemd1: Starting The Apache HTTP Server...

10月 30 21:36:41 localhost.localdomain httpd31063: 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 httpd31063: (98)Address already in use: AH00072: make_sock: could not bind to address :::80

10月 30 21:36:41 localhost.localdomain httpd31063: (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 httpd31063: no listening sockets available, shutting down

10月 30 21:36:41 localhost.localdomain httpd31063: AH00015: Unable to open logs

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

10月 30 21:36:41 localhost.localdomain systemd1: Failed to start The Apache HTTP Server.

10月 30 21:36:41 localhost.localdomain systemd1: Unit httpd.service entered failed state.

10月 30 21:36:41 localhost.localdomain systemd1: 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 systemd1: Starting The Apache HTTP Server...

10月 30 21:44:00 localhost.localdomain httpd41074: 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 systemd1: Started The Apache HTTP Server.

Hint: Some lines were ellipsized, use -l to show in full.

相关推荐
海兰18 小时前
【 Kafka进阶5】使用 Docker 部署 Apache Kafka 集群完全指南
docker·kafka·apache
垂钓的小鱼11 天前
用关联图谱做量化选股:让基本面惊喜沿着网络扩散
服务器·php·apache
深维AI随笔1 天前
《构建之法》| 第二章个人技术和流程:单元测试不是“可选“,而是“必需“
单元测试·log4j·apache
极客灵风2 天前
免费约课小程序免费约课系统的区别,一文看懂怎么选
apache
xixiaoyunya2 天前
中小微企业轻量组网方案的技术选型与实践:从传统专线到软定义隧道的成本与效能分析
服务器·php·apache
SelectDB技术团队2 天前
四川航空湖仓一体:基于 SelectDB / Apache Doris 的多源数据联邦分析实践
apache
海兰2 天前
【Kafka进阶4】KRaft 完全指南:Apache Kafka 摆脱 ZooKeeper 的架构
zookeeper·kafka·apache
2601_967019512 天前
如何选择合适的SSL证书类型?
apache
我变秃了也没变强3 天前
standalone模式部署flink集群
flink·apache