Apache is not starting automatically after reboot

5,233

Have you tried sudo systemctl enable apache2? It could be it got disabled somehow. If it's starting without problems using the start command, I can't imagine why this wouldn't fix it not starting on its own.

If this fixes it, it means there's no errors; it just wasn't being told to start.

Share:
5,233

Related videos on Youtube

wruckie
Author by

wruckie

Updated on September 18, 2022

Comments

  • wruckie
    wruckie over 1 year

    I have a two fold question.

    I installed updates today and rebooted my VPS server running Ubuntu 18.04 LTS and LAMP. Apache2 has been installed for years and has worked without issue all this time. Today after the reboot, I noticed that my Apache service did not restart on its own. It restarted without complaint at sudo service apache2 start, and there is nothing in /var/log/apache2/error.log of any concern. Subsequent reboots prove that the service continues to not restart on reboot.

    1) how do I go back to see what updates were just installed?
    2) Is there another Ubuntu log that might show me what is causing this service to fail to start after a reboot?

    Example of what is in the logs

    [Mon Nov 05 17:50:19.860989 2018] [mpm_prefork:notice] [pid 1966] AH00169: caught SIGTERM, shutting down
    [Mon Nov 05 17:50:19.987368 2018] [mpm_prefork:notice] [pid 2215] AH00163: Apache/2.4.37 (Ubuntu) OpenSSL/1.1.1 configured -- resuming normal operations
    [Mon Nov 05 17:50:19.987506 2018] [core:notice] [pid 2215] AH00094: Command line: '/usr/sbin/apache2'
    
    • George Udosen
      George Udosen over 5 years
      Please run sudo systemctl is-enabled apache2 to see if it's enabled!
    • wruckie
      wruckie over 5 years
      Apache2 had been enabled. After installing the updates today, I did a reboot. Apache2 did restart on its own. Do not know what time or these updates did to fix it, but I might be able to breathe easier now. Not any closer to knowing Why!