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.

×
Submit an Answer
2 answers

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

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:

  • 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

by Justin Ellingwood
In this article, we will cover how to install and utilize the vim text editor. The vim editor is an improvement on the standard "vi" editor standard on every POSIX-compliant system. We will go over the basics of modal editing and how chaining commands can help you accomplish editing tasks quickly.
  • Bonjour Alex,

    Compris. un instant le fais et je vous reviens

    • Hello there,

      Did you manage to sort out the issue?

      Regards,
      Alex

      • Hi Alex,

        Oh yes, sorry for the no return. by the way it was the configuation file that had a problem. I have not completely modify the file by putting the name of the host windows. what I did at all levels and the nagios server was able to resume its activity. once again sorry for the no return and thank you for the help

        /usr/local/nagios/etc/objects/windows.cfg

        it was the file above