Apache2 HTTP Ubuntu Won't Restart

Posted September 29, 2018 4.8k views
ApacheUbuntu 18.04

Hey since I have attempted to install SSL onto my site I am unable to restart without removing it from the config.

I am running Ubuntu Ubuntu 18.04 x64

Changes for SSL:

<VirtualHost *:443>
DocumentRoot   /var/www/html
ServerName -- I have the actual site name here
SSLEngine      on
SSLCertificateFile        /ssl-files/ # I have the actual cert here
SSLCertificateKeyFile     /ssl-files/site_name.key # I have the actual key name here

However when I run this I in the conf I get

Job for apache2.service failed because the control process exited with this error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

For some reason when I remove the SSL parts it works fine, I have tried purging and reinstalling apache2, with no luck.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Can you post the output of the command “journalctl -xe” when this happens? It will likely contain some clues. But generally when the Apache service fails right after an SSL directive or cert change, it means two things:

  1. The SSL cert is invalid (corrupted, cert doesn’t match the key and vice versa)

  2. The files don’t exist or are not permissioned correctly

I’d check those two things and with the actual error from the log, I’m sure you’ll be able to figure out the culprit.