404: The requested URL /nagiosxi/ was not found on this serv

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
tsengineering
Posts: 7
Joined: Mon Mar 13, 2017 3:57 am

404: The requested URL /nagiosxi/ was not found on this serv

Post by tsengineering »

The requested URL /nagiosxi/ was not found on this server.

I found that the server was powered down after it was reported nagios was down. I powered up and, when attempted to access the UI to enter creds, received the above error.

I restarted apache and nagios with no change.

error_log file reports (ips masked to hide):

[Fri Apr 27 10:12:29 2018] [error] [client x.x.x.x] File does not exist: /var/www/html/nagiosxi, referer: http://x.x.x.x/

I cannot think of any reason this file would have been deleted by a human--either intentionally or accidentally. The referenced directory does not in fact have the file. I see index.php index.php.orig n the dir. Is this a matter of just chaning the name of index.php to nagiosxi.php?

Thank you
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by tgriep »

The Nagios XI web files are located in this folder.
/usr/local/nagiosxi/html

Verify that the folder exists and that the permissions are good.

Can you post the following Apache configuration files so we can check the settings?

Code: Select all

/etc/httpd/conf/httpd.conf
/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf.d/nagiosxi.conf
Can you run the following as root and post the /tmp/info.txt file.

Code: Select all

chage -l nagios >/tmp/info.txt
chage -l apache >>/tmp/info.txt
df -h >>/tmp/info.txt
df -i >>/tmp/info.txt
ps -ef --cols=300 >>/tmp/info.txt

Do you have any idea on what stopped working on the server and the symptoms you were seeing?
Be sure to check out our Knowledgebase for helpful articles and solutions!
tsengineering
Posts: 7
Joined: Mon Mar 13, 2017 3:57 am

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by tsengineering »

Attached are the requested file. Note there was no nagios file in the dir;closest was nagvis.conf.

Also, look at the output when I ran the first chage command:

# chage -l nagios >/tmp/info.txt
chage: user 'nagios' does not exist in /etc/passwd
You do not have the required permissions to view the files attached to this post.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by npolovenko »

@tsengineering, Are you saying that there are no files in this directory?
The Nagios XI web files are located in this folder.
/usr/local/nagiosxi/html

Verify that the folder exists and that the permissions are good.
It also looks like the nagios process is not running. Please run the following commands:

Code: Select all

service nagios start
service httpd start
Let me know what errors do you get, and whether the web interface started working after running these commands?

What version of the OS are you running the XI on? Do you have anything else installed on the same OS other then Nagios?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tsengineering
Posts: 7
Joined: Mon Mar 13, 2017 3:57 am

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by tsengineering »

ladies and gents

service nagios start
nagios: unrecognized service

service httpd start is successful

/usr/local/nagiosxi/

the only thing in the above directory is /var/ ...no httpd dir
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by scottwilkerson »

I would be looking to restore from a backup and possibly into someone accessing the server who shouldn't have been.

Someone/thing has remove almost all remnants of a nagios installation.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
tsengineering
Posts: 7
Joined: Mon Mar 13, 2017 3:57 am

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by tsengineering »

Thanks for the input and sorry it took so long for me to reply back.

I do believe it is hosed. I did find a snapshot and reverted, however, the UI passwd isn't working. I tried the suggestions in this post:

https://askubuntu.com/questions/654668/ ... nfig-files

None prompted me for a password change except:

$ find / -name nagios*.conf

###/etc/httpd/conf.d/nagios.conf

$ cat /etc/httpd/conf.d/nagios.conf | grep AuthUserFile
###AuthUserFile /etc/nagios/passwd
$ sudo htpasswd -c /etc/nagios/passwd nagiosadmin

"finally" I thought but when I tried to login to the UI it still fails. I rebooted to restart all services and still no luck?
kyang

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by kyang »

Hello,

Is this for XI?

The password in that auth file for that particular apache file --> nagios.conf is for Core.

If you're trying to change the nagiosadmin password for the XI UI, you would want to try this.
https://support.nagios.com/kb/article.php?id=146
tsengineering
Posts: 7
Joined: Mon Mar 13, 2017 3:57 am

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by tsengineering »

That worked thanks!

Truth is I had tried that but used special chars and didn't follow the directive necessary for pw with special chars.

Now onto the new errors but I'm in the UI. thanks again
kyang

Re: 404: The requested URL /nagiosxi/ was not found on this

Post by kyang »

Glad it worked!

You can post any new errors by creating a new thread.

Otherwise, I'll be closing this thread since you are able to log into Nagios Xi.
Locked