I have 2 servers running with HestiaCP.
I have setup many servers using HestiaCP, But I am facing a problem with two of them with Apache where it stops working for no apparent reason and without modifying the server.
It simply works without a problem when trying to start it from the services page in HestiaCP.
Also when rebooting the server it does not work automatically, But has to be started manually each time.
Is there an explanation for this situation?
Hi @sahsanu
Thank you for your answer.
root@games /var/log/hestia # journalctl -u apache2.service -b --no-pager -l
– Logs begin at Wed 2024-07-10 11:45:47 +03, end at Sat 2024-11-09 19:43:08 +03. –
Nov 09 17:50:05 games.domain.com systemd[1]: Starting The Apache HTTP Server…
Nov 09 17:50:05 games.domain.com apachectl[771]: (99)Cannot assign requested address: AH00072: make_sock: could not bind to address ServerIP:8443
Nov 09 17:50:05 games.domain.com apachectl[771]: no listening sockets available, shutting down
Nov 09 17:50:05 games.domain.com apachectl[771]: AH00015: Unable to open logs
Nov 09 17:50:05 games.domain.com systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Nov 09 17:50:05 games.domain.com systemd[1]: apache2.service: Failed with result ‘exit-code’.
Nov 09 17:50:05 games.domain.com systemd[1]: Failed to start The Apache HTTP Server.
Nov 09 17:52:46 games.domain.com systemd[1]: Starting The Apache HTTP Server…
Nov 09 17:52:46 games.domain.com systemd[1]: Started The Apache HTTP Server.
### Editing /etc/systemd/system/apache2.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
[Unit]
After=network-online.target
Wants=network-online.target
### Lines below this comment will be discarded
### /lib/systemd/system/apache2.service
[...]
Thank you,
I have add this and rebooted the server the server Apache is working automatically.
I will see if it will fail to restart in the coming days or not.