localhost/nagios 404 not found

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.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

localhost/nagios 404 not found

Post by ziedmahjoub »

Hello , Im working on IT in a company and i'm new at nagios , i installed ubuntu server 14.04.1 and free Nagios core. i made the installation with this faq :

http://ubuntuserverguide.com/2013/02/ho ... 12-10.html

but i installed nagios-4.0.8 instead of 3.4.4 .

After i completed the installation , when i open http://localhost/nagios/ ,it told me :
NOT FOUND
The requested URL /nagios was not found on this server.


i checked apache2 and nagios services and they are running .

Someone has an idea what can be the porblem ?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: localhost/nagios 404 not found

Post by slansing »

Did you make sure to run:

Code: Select all

make install-webconf
During the build process? I'm not sure why that was missing from the guide, but I've ran into this issue when I don't do that. Take a look at:

http://assets.nagios.com/downloads/nagi ... Source.pdf
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: localhost/nagios 404 not found

Post by lgroschen »

In addition to sams link here is a great resource for Ubuntu 14.04 for configuring core 4: http://www.unixmen.com/install-configur ... 4-1014-04/
/Luke
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: localhost/nagios 404 not found

Post by Box293 »

Here is a detailed guide to install core on Ubuntu 14.04.

http://sites.box293.com/nagios/guides/i ... untu-14-04
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: localhost/nagios 404 not found

Post by ziedmahjoub »

i installed the webconfig in my installation .

guys do u recommand me to reinstall it again ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: localhost/nagios 404 not found

Post by abrist »

After the web config install, did you restart apache?

Code: Select all

service httpd restart
Or:

Code: Select all

service apache restart
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: localhost/nagios 404 not found

Post by ziedmahjoub »

Yes i made it , and i have installed it again now with this URL and same problem :((((((( :

http://www.unixmen.com/install-configur ... 4-1014-04/
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: localhost/nagios 404 not found

Post by ziedmahjoub »

wowowowoowwo , i juste realise it now , when i type : make install-webconf

i got this message :

/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file '/etc/httpd/conf.d/nagios.conf': No such file or directory
make: *** [install-webconf] Error 1


and i dont have httpd and conf.d directories in /etc/

i think in new apache2 version we have /etc/apache2/conf-available who is doing their job , right ?
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: localhost/nagios 404 not found

Post by ziedmahjoub »

i made this solution requested in this guide :
http://www.unixmen.com/install-configur ... 4-1014-04/

the solution says :

You may get the following error:

/usr/bin/install -c -m 644 sample-config/httpd.conf /etc/httpd/conf.d/nagios.conf
/usr/bin/install: cannot create regular file ‘/etc/httpd/conf.d/nagios.conf’: No such file or directory
Makefile:296: recipe for target 'install-webconf' failed
make: *** [install-webconf] Error 1
The above error message describes that nagios is trying to create the nagios.conf file inside the /etc/httpd.conf/ directory. But, in Ubuntu systems the nagios.conf file should be placed in /etc/apache2/sites-enabled/ directory.

So, run the following command instead of using sudo make install-webconf.

sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-enabled/nagios.conf



but it didn't solve my problem
ziedmahjoub
Posts: 142
Joined: Fri Jan 16, 2015 5:22 am

Re: localhost/nagios 404 not found

Post by ziedmahjoub »

Hello,

i solved my problem with creating the files needed :

mkdir /etc/httpd
mkdir /etc/httpd/conf.d
mkdir /etc/httpd/conf.d/nagios.conf

and its solved !!!

but i didn't understand how !! Because i think that in the new apache version /etc/httpd/conf.d and /etc/apache2/conf.d are replaced in /etc/apache2/conf-available .
SO how when i create httpd and conf.d my problem is solved ?
Maybe in the Markfile webconf still linked to /etc/httpd/conf.d/nagios.conf ?
Locked