為什麼新安裝的 apache2 無法在 Ubuntu Server 20 中啟動

為什麼新安裝的 apache2 無法在 Ubuntu Server 20 中啟動

安裝了新的 Ubuntu Server 20。

Aug 16 21:06:47 xxx apachectl[2563820]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message 
Aug 16 21:06:47 xxx apachectl[2563820]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Aug 16 21:06:47 xxx apachectl[2563820]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Aug 16 21:06:47 xxx apachectl[2563820]: no listening sockets available, shutting down
Aug 16 21:06:47 xxx apachectl[2563820]: AH00015: Unable to open logs
Aug 16 21:06:47 xxx apachectl[2563802]: Action 'start' failed.
Aug 16 21:06:47 xxx apachectl[2563802]: The Apache error log may have more information.
Aug 16 21:06:47 xxx systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Aug 16 21:06:47 xxx systemd[1]: apache2.service: Failed with result 'exit-code'.
Aug 16 21:06:47 xxx systemd[1]: Failed to start The Apache HTTP Server.
Processing triggers for systemd (245.4-4ubuntu3.2) ...

答案1

請發布輸出

netstat -tulpen | grep 80

看來80埠已經被使用了。

查看你的錯誤日誌:

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

相關內容