正如问题所述,我在 ubuntu 中安装了 apache2,但 https 服务器加载失败。我尝试调查,journalctl 给出了以下输出:
$ journalctl _PID=9176
-- Logs begin at Fri 2020-02-21 23:19:35 IST, end at Tue 2020-03-03 19:09:21 IST. --
Mar 03 19:09:21 node1 apachectl[9176]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2401:4900:30b1:ccc8:184b:e745:5b8b:c562. Set the 'ServerName' directive globa
Mar 03 19:09:21 node1 apachectl[9176]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Mar 03 19:09:21 node1 apachectl[9176]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Mar 03 19:09:21 node1 apachectl[9176]: no listening sockets available, shutting down
Mar 03 19:09:21 node1 apachectl[9176]: AH00015: Unable to open logs
Mar 03 19:09:21 node1 apachectl[9176]: Action 'start' failed.
Mar 03 19:09:21 node1 apachectl[9176]: The Apache error log may have more information.
我无法理解真正的问题所在以及如何解决它。有什么帮助吗?
答案1
有些软件已经占用了 80 端口,apache2 无法启动。我认为你必须停止另一个 web 服务器(例如 nginx)并运行netstat -lnp
,然后查找哪个程序占用了 80 端口