[Solved] Can't connect to the web page
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Can't connect to the web page
Let us know how the re-installation goes
.
Re: Can't connect to the web page
Hmmm... Not so good. I made it to the following step:
and this error popped up:
Do you think there's an inherent problem with my CentOS install? Should I Nuke & Repopulate?
Thanks,
Joe B
Code: Select all
Create a Default User for Web Access.
Add a default user for Web Interface Access:
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadminCode: Select all
[root@FreeNag jobee]# htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Usage:
htpasswd [-cmdpsD] passwordfile username
htpasswd -b[cmdpsD] passwordfile username password
htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password.
-d Force CRYPT encryption of the password (default).
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
-D Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.Thanks,
Joe B
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Can't connect to the web page
Do you already have this file from the past installation? /usr/local/nagios/etc/htpasswd.users If so you should remove it then run the command to create it again.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: Can't connect to the web page
That file isn't there:
Thanks,
Joe B
Code: Select all
[root@FreeNag etc]# ls -l
total 64
-rw-rw-r-- 1 nagios nagios 12015 May 8 08:52 cgi.cfg
-rw-rw-r-- 1 nagios nagios 44475 May 8 08:52 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 May 8 08:52 objects
-rw-rw---- 1 nagios nagios 1312 May 8 08:52 resource.cfg
[root@FreeNag etc]#Joe B
Re: Can't connect to the web page
Normally you see the usage of a command, when there is a syntax error... however your command looks just fine. I wonder if there is something goofy with any of the characters... Did you copy/paste the command or you typed it? Try typing it, and see if you are going to get the same output.
Also, run the following commands and show us the output:
Also, run the following commands and show us the output:
Code: Select all
sestatus
grep htpasswd /etc/httpd/conf.d/nagios.confBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Can't connect to the web page
Thanks lmiltchev, that was the problem. I just typed the command and it worked. I recently posted an off-topic question in one of my posts about Notepad not correctly displaying files while Wordpad can. Sreinhardt said it had to do with line endings. I'm guessing it was the same issue here. Anyway, I'm on to the next step in the process.
Thanks,
Joe B
Thanks,
Joe B
Re: Can't connect to the web page
Nope. I made it down to the last step but my Nagios server isn't responding. I did an NMAP scan and the only port that's open is 22. I've restarted the Nagios service and it restarts no problem. I've restarted the httpd service and it restarts no problem. When I run ps I see that httpd is running. I'm heading home now but I think I'll do my Nuke & Repopulate tomorrow if I have time. Next week if that works better for me.
Thanks,
Joe B
Thanks,
Joe B
Re: Can't connect to the web page
Let us know how that works out. We'll keep this open for a bit.
Former Nagios employee
Re: Can't connect to the web page
I'm working with CentOS 64-bit. Does that have any impact on a Nagios install?
Thanks,
Joe B
Thanks,
Joe B
Re: Can't connect to the web page
The only thing the architecture will have an impact on is if you try to use 64-bit binaries on a 32-bit system. Other than that Nagios runs just fine on either.
Former Nagios employee