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.

相关推荐
james的分享7 天前
大数据领域核心 SQL 优化框架Apache Calcite介绍
大数据·sql·apache·calcite
莫寒清7 天前
Apache Tika
java·人工智能·spring·apache·知识图谱
归叶再无青7 天前
web服务安装部署、性能升级等(Apache、Nginx)
运维·前端·nginx·云原生·apache·bash
忙碌5448 天前
OpenTelemetry实战指南:构建云原生全链路可观测性体系
ios·flink·apache·iphone
悠闲蜗牛�8 天前
Apache Flink实时计算实战指南:从流处理到数据湖仓一体的架构演进
架构·flink·apache
2301_816997889 天前
Apache Commons工具类
apache
心雨⁢⁢⁣9 天前
RocketMq(Apache RocketMQ 5.2.1-SNAPSHOT)消息消费流程
apache·rocketmq·java-rocketmq
切糕师学AI9 天前
Apache ZooKeeper 简介
分布式·zookeeper·apache
忙碌5449 天前
实时流处理架构深度剖析:Apache Flink在实时数仓与风控系统的工程实践
架构·flink·apache
x***r15112 天前
phpstudy_x64_8.1.1.3安装教程(含Apache/MySQL启动与端口修改)
数据库·mysql·apache