ERROR: Site Nagios does not exist. Help!
Posted: Thu Jan 19, 2017 3:55 pm
Hi there,
I have been following the Nagios Core from source installation tutorial. I ran into a problem while trying to run the command:I kept receiving ERROR: Site Nagios does not exist! After doing a little more research I thought I discovered that it was a problem with the suffix file being .cfg instead of .conf since I am running Apache 2.4.18
So I tried renaming and copying the file to the apache2 folder:After running the first command the site was enabled.
On to the next step
I am very lost and would love some direction. Thank you!
I have been following the Nagios Core from source installation tutorial. I ran into a problem while trying to run the command:
Code: Select all
sudo a2ensite nagios
So I tried renaming and copying the file to the apache2 folder:
Code: Select all
sudo mv /tmp/nagios-4.2.0/sample-config/nagios.cfg /tmp/nagios-4.2.0/sample-config/nagios.conf
sudo cp /tmp/naigo-4.2.0/sample-config/nagios.conf /etc/apache2/sites-available
On to the next step
Code: Select all
sudo a2enmod rewrite cgi
Module rewrite already enabled
AH00526: Syntax error on line 18 of /etc/apache2/sites-enabled/nagios.conf:
Invalid command 'log_file=/usr/local/nagios/var/nagios.log', perhaps misspelled or defined by a module not included in the server configuration
Module cgi already enabled
Code: Select all
systemctl restart apache2
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details
Code: Select all
systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2017-01-19 12:41:07 PST;
Docs: man:systemd-sysv-generator(8)
Process: 28995 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 28900 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 30812 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Jan 19 12:41:07 AndyLinux apache2[30812]: * The apache2 configtest failed.
Jan 19 12:41:07 AndyLinux apache2[30812]: Output of config test was:
Jan 19 12:41:07 AndyLinux apache2[30812]: AH00526: Syntax error on line 18 of /etc/apache2/site-enabled/nagios.conf:
Jan 19 12:41:07 AndyLinux apache2[30812]: Invalid command 'log_file=/usr/local/nagios/var/nagios.log', perhaps misspelled or defined by a module
Jan 19 12:41:07 AndyLinux apache2[30812]: Action 'configtest' failed.
Jan 19 12:41:07 AndyLinux apache2[30812]: The Apache error log may have more information.
Jan 19 12:41:07 AndyLinux systemd[1]: apache2.service: Control process exited, code=exited status=1
Jan 19 12:41:07 AndyLinux systemd[1]: Failed to start LSB: Apache2 web server.
Jan 19 12:41:07 AndyLinux systemd[1]: apache2.service: Unit entered failed state.
Jan 19 12:41:07 AndyLinux systemd[1]: apache2.service: Failed with result 'exit-code'.