I build my own server on EC2 this weekend, everything goes well and my server is running, at least for a while, until shutdown.
First of all, I'm starting the server with sudo service apache2 status
and everything is perfect, my server starts and I am able to navigate around my webpage.
Then, suddenly the server stops running (the EC2 instance works perfect)
when I do sudo service apache2 status
I get this output:
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Tue 2019-07-16 01:28:00 UTC; 54min ago
Process: 18543 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 18565 (code=exited, status=1/FAILURE)
Jul 15 21:17:38 ip-172-31-9-236 systemd[1]: Starting The Apache HTTP Server...
Jul 15 21:17:38 ip-172-31-9-236 systemd[1]: Started The Apache HTTP Server.
Jul 16 01:28:00 ip-172-31-9-236 systemd[1]: apache2.service: Main process exited, code=exited, status=1/FAILURE
Jul 16 01:28:00 ip-172-31-9-236 systemd[1]: apache2.service: Failed with result 'exit-code'.
And I really don't know why.
I'm using EC2 from amazon with a route53 and https from cerbot.
The /var/log/apache2/error.log
output is nothing.
journalctl -xe
to see if there is any log information. – mchid Jul 16 '19 at 04:09journalctl -xe | grep apache
see here: https://askubuntu.com/questions/629995/apache-not-able-to-restart however, if you decide to reinstall or purge apache2, don't forge to backup your files first! Also, you can try starting withsudo systemctl start apache2
orsudo systemctl restart apache2
Additionally, please post a comment to let us know if that answer works for you or not so that we can mark this as a duplicate or try to figure something else out. Thanks! – mchid Jul 16 '19 at 04:22journalctl -xe
for some additional information? Systemd may have errors that are not reported in/var/log/apache2/error.log
. – mchid Jul 17 '19 at 06:50/var/log/apache2/error.log.1
says something about mutex and I guess I fix it uncommenting a line in the/etc/lib/apache2/apache2.conf
– Julian Mendez Jul 17 '19 at 14:24