目录
【错误收集】
● 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 httpdsystemctl 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.
