Hello everyone, please I try to start an apache2 server that I just installed but it refuses. At the beginning it worked well. After installing the Nagios monitoring server on it, it refuses to start. Everything is on an Ubuntu 20.04 virtual server
● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-10-08 10:27:04 UTC; 24min ago Docs: https://httpd.apache.org/docs/2.4/
Oct 08 10:27:04 charbonserver systemd[1]: Starting The Apache HTTP Server… Oct 08 10:27:04 charbonserver apachectl[6485]: AH00526: Syntax error on line 37 of /etc/apache2/conf-enabled/nagios4-cgi.conf: Oct 08 10:27:04 charbonserver apachectl[6485]: Invalid command ‘AuthDigestDomain’, perhaps misspelled or defined by a module not included in > Oct 08 10:27:04 charbonserver apachectl[6482]: Action ‘start’ failed. Oct 08 10:27:04 charbonserver apachectl[6482]: The Apache error log may have more information. Oct 08 10:27:04 charbonserver systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Oct 08 10:27:04 charbonserver systemd[1]: apache2.service: Failed with result ‘exit-code’. Oct 08 10:27:04 charbonserver systemd[1]: Failed to start The Apache HTTP Server. lines 1-13/13 (END)
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.
Hello, @koboni2000
As the message says there is a SyntaxError in your Apache configuration file.
You can open the file with a text editor like vi, vim or nano and sort out the syntax error:
If you’re not familiar with editing files via ssh you can check out these articles:
https://www.digitalocean.com/community/tutorials/basic-linux-navigation-and-file-management#editing-files
https://www.digitalocean.com/community/tutorials/how-to-use-vim-for-advanced-editing-of-plain-text-or-code-on-a-vps-2
https://www.digitalocean.com/community/tutorials/installing-and-using-the-vim-text-editor-on-a-cloud-server
You can also share the output of the file (line 37) here and we can check this together.
Regards, Alex
Hey there!
It looks like there may be a syntax error in your configuration file /etc/apache2/conf-enabled/nagios4-cgi.conf. I’d recommend you check that file and verify line 37 is correct and does not have any syntax errors.
The apache logs in /var/log/apache2 may also have more details on the error.
Hope it helps! Nate