No apache site configuration when installing nagios core 4

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
survex
Posts: 1
Joined: Wed Oct 05, 2016 8:18 am

No apache site configuration when installing nagios core 4

Post by survex »

I'm trying to install nagios from source as described in - https://assets.nagios.com/downloads/nag ... Source.pdf

I'm following all steps. But at the step where nagios site should be enabled to apache I'm getting:
$ a2ensite nagios
ERROR: Site nagios does not exist!

While:
$ make install-webconf
/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/nagios.conf

So apache knows only about one config /etc/apache2/nagios.conf, but there are no config in /etc/apache2/site-available, so apache cannot enable any nagios site.

What am I doing wrong?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: No apache site configuration when installing nagios core

Post by lmiltchev »

Can you run the following commands and show the output?

Code: Select all

uname -a
cat /etc/*release
apache2 -v
php -v
Be sure to check out our Knowledgebase for helpful articles and solutions!
uhallgarn
Posts: 3
Joined: Wed Oct 12, 2016 3:52 am

Re: No apache site configuration when installing nagios core

Post by uhallgarn »

I have same problems with no nagios or nagios.conf file in /etc/apache2/sites-avalable
I used the instructions on Installing_Nagios_Core_From_Source, but got same error message when I used the command sudo a2ensite nagios.
uhallgarn
Posts: 3
Joined: Wed Oct 12, 2016 3:52 am

Re: No apache site configuration when installing nagios core

Post by uhallgarn »

I got it working.

I made a copy of /etc/httpd/conf.d/nagios.conf/httpd.conf to /etc/apache2/sites-available
Then I renamed the httpd.conf (in sites-available) to nagios.conf
Then the apach2 must be reloded: service apache2 reload
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: No apache site configuration when installing nagios core

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
uhallgarn
Posts: 3
Joined: Wed Oct 12, 2016 3:52 am

Re: No apache site configuration when installing nagios core

Post by uhallgarn »

I think the installation scripts are faulty. Should have worked without doing this manual work.
Someone maybe should write a tr?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: No apache site configuration when installing nagios core

Post by dwhitfield »

You are welcome to file a bug report at https://github.com/NagiosEnterprises/nagioscore/issues

To clarify, your particular issue is resolved, correct?
Last edited by dwhitfield on Wed Mar 15, 2017 11:01 am, edited 1 time in total.
Reason: clarification
rafael.petersen
Posts: 1
Joined: Wed Mar 15, 2017 10:09 am

Re: No apache site configuration when installing nagios core

Post by rafael.petersen »

I found the error into the make-install-webconf....

the scripts with the error is:

/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2//nagios.conf
if [ 0 -eq 1 ]; then \
ln -s /etc/apache2//nagios.conf /etc/apache2/sites-enabled/nagios.conf; \
fi

the error is in the path "/etc/apache2//nagios.conf" the "sites-available" is missing between the slashes.....
just execute the command manually with the correct path.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: No apache site configuration when installing nagios core

Post by cdienger »

Thank you for the update. I did a quick search and didn't see a bug that fit so, if you haven't already, I would suggest again to file one at https://github.com/NagiosEnterprises/nagioscore/issues.

Did you have any further questions or would it be okay to close the thread at this point?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked