Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache fails to restart |
|
Author |
|
kbarmettler
Joined: 31 May 2018 Posts: 2 Location: Rio Rico
|
Posted: Thu 31 May '18 20:59 Post subject: Apache fails to restart |
|
|
I did something stupid. I was cleaning up some test sites when I accidentally issued the following command:
Code: | sudo a2dissite nameofsite.com |
Instead of
Code: | sudo a2dissite nameofsite.com.conf |
I then issued the command:
Code: | sudo systemctl restart apache2 |
and saw the following:
Code: | Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details. |
Here's what's in the systemctl status:
Code: | May 31 18:53:21 helena apache2[2046]: * The apache2 configtest failed.
May 31 18:53:21 helena apache2[2046]: Output of config test was:
May 31 18:53:21 helena apache2[2046]: apache2: Syntax error on line 219 of /etc/apache2/apache2.conf: Could not open configuration file /etc
May 31 18:53:21 helena apache2[2046]: Action 'configtest' failed.
May 31 18:53:21 helena apache2[2046]: The Apache error log may have more information.
May 31 18:53:21 helena systemd[1]: apache2.service: Control process exited, code=exited status=1
May 31 18:53:21 helena systemd[1]: Failed to start LSB: Apache2 web server.
May 31 18:53:21 helena systemd[1]: apache2.service: Unit entered failed state.
May 31 18:53:21 helena systemd[1]: apache2.service: Failed with result 'exit-code'. |
Line 219 of apache2.conf is:
Code: | IncludeOptional sites-enabled/*.conf |
Can anyone tell me how to fix this? Thanks so much for reading... |
|
Back to top |
|
kbarmettler
Joined: 31 May 2018 Posts: 2 Location: Rio Rico
|
Posted: Thu 31 May '18 21:08 Post subject: |
|
|
For posterity: It turns out, there was an invalid conf shortcut in my sites-enabled folder. Some time ago I had accidentally enabled "example.com.conf" in a mindless tutorial-following haze, and earlier today when I saw it in sites-available, I got rid of it; but it was still in sites-enabled. So the next time I restarted apache2, it caused the error described above. |
|
Back to top |
|
|
|
|
|
|