apache2 won't start due to syntax error in config file
Ubuntu 20.04.3 LTS.
Clean install of apache2 (version 2.4.41-4ubuntu3.8 amd64)
apache2 won't start due to syntax error in config file, but I can't see the error.
Steps to reproduce:
sudo apt-get purge apache2
rm -r /etc/apache2
sudo apt-get install apache2
Expected to see: error-free start
What happened:
...
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Sat 2021-12-04 10:48:59 GMT; 10ms ago
Docs: https:/
Process: 3059008 ExecStart=
Dec 04 10:48:59 mycomputer systemd[1]: Starting The Apache HTTP Server...
Dec 04 10:48:59 mycomputer apachectl[3059021]: apache2: Syntax error on line 147 of /etc/apache2/
Dec 04 10:48:59 mycomputer apachectl[3059008]: Action 'start' failed.
Dec 04 10:48:59 mycomputer apachectl[3059008]: The Apache error log may have more information.
Dec 04 10:48:59 mycomputer systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 04 10:48:59 mycomputer systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 04 10:48:59 mycomputer systemd[1]: Failed to start The Apache HTTP Server.
...
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Ubuntu apache2 Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- actionparsnip
- Solved:
- Last query:
- Last reply: