Question

i can't start my apache2

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)


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @koboni2000

As the message says there is a SyntaxError in your Apache configuration file.

Syntax error on line 37 of /etc/apache2/conf-enabled/nagios4-cgi.conf

You can open the file with a text editor like vi, vim or nano and sort out the syntax error:

  1. vim +37 /etc/apache2/conf-enabled/nagios4-cgi.conf

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