Job for apache2.service failed because the control process exited with error code. See"systemctl status apache2.service" and "journalctl -xeu apache2.service" for details. invoke-rc.d: initscript apache2, action "restart" failed. × apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-10-1210:04:59 CST; 22ms ago Docs: https://httpd.apache.org/docs/2.4/ Process: 121228 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) CPU: 12ms
Oct1210:04:59 VM-0-7-ubuntu systemd[1]: Starting The Apache HTTP Server... Oct1210:04:59 VM-0-7-ubuntu apachectl[121231]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121231]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121231]: no listening sockets available, shutting down Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121231]: AH00015: Unable to open logs Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121228]: Action 'start' failed. Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121228]: The Apache error log may have more information. Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'. Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: Failed to start The Apache HTTP Server. apache2_invoke: Enable module php8.2 Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xeu apache2.service" for details. invoke-rc.d: initscript apache2, action "restart" failed. × apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-10-12 10:04:59 CST; 6ms ago Docs: https://httpd.apache.org/docs/2.4/ Process: 121262 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE) CPU: 18ms Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: Starting The Apache HTTP Server... Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121265]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80 Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121265]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121265]: no listening sockets available, shutting down Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121265]: AH00015: Unable to open logs Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121262]: Action 'start' failed. Oct 12 10:04:59 VM-0-7-ubuntu apachectl[121262]: The Apache error log may have more information. Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'. Oct 12 10:04:59 VM-0-7-ubuntu systemd[1]: Failed to start The Apache HTTP Server.
3.修改Apache2端口
1
vim /etc/apache2/ports.conf
修改为如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default.conf