Page 1 of 1

Can't login after installation - HTML file is downloaded...

Posted: Wed Jun 12, 2013 8:43 pm
by grafton
Hey there,

I have some sort of server miss configuration. I'm hoping someone can point out where I went wrong…

I followed these installation steps for Ubuntu:

http://assets.nagios.com/downloads/nagi ... Source.pdf

But the command '

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
' would straight-up not do anything, prompting me instead to the proper usage of the htpassword command.

I then adjusted my installation slightly based off this 12.04 LTS tutorial: http://ubuntuforums.org/showthread.php?t=1986743

This moved my htpasswd.users file to /etc/nagios/htpasswd.users. These adjustments are appropriately reflected in my /etc/apache2/conf.d/nagios.conf file:
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
Require valid-user
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
Require valid-user
</Directory>
I was then able to use '

Code: Select all

htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
' to set my password, which I changed to nagiosadmin for simplicities sake.

ls -la /etc/nagios reveals:
-rw-rw-r-- 1 nagios nagios 11659 Jun 13 01:10 cgi.cfg
-rw-r--r-- 1 nagios nagios 50 Jun 13 01:25 htpasswd.users
-rw-rw-r-- 1 nagios nagios 43989 Jun 13 01:10 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 Jun 13 01:13 objects
-rw-rw---- 1 nagios nagios 1340 Jun 13 01:10 resource.cfg
Permissions seem fine.

When I navigate to <my_ip_address>/nagios I get an Apache login dropdown (awesome) - but when I type in my username and password (both nagiosadmin) I get a file:// and Safari downloads an html file called 'nagios', containing the attached.

Anyone know where I went wrong? Really appreciate the insight. :)

Re: Can't login after installation - HTML file is downloaded

Posted: Thu Jun 13, 2013 10:00 am
by slansing
What distro did you install this on? The installing from source guide should have gotten you all the way through the installation, I'm not sure what you mixed and matched in the other document.

Re: Can't login after installation - HTML file is downloaded

Posted: Thu Jun 13, 2013 12:12 pm
by grafton
Ubuntu 12.04 LTS
I followed the Nagios instructions first. They did not work.

htpasswd -c would simply not work (server configuration issue?)

I got around this step by following the other guide, which essentially moved where the password file was kept, as far as I could tell.

Other than that I exclusively followed the Nagios instructions. :\

Re: Can't login after installation - HTML file is downloaded

Posted: Thu Jun 13, 2013 12:36 pm
by abrist
Did you also install nagios from ubuntu's package repos? If so, you may have a issues as each method places configs in a different location.

Re: Can't login after installation - HTML file is downloaded

Posted: Fri Oct 18, 2013 5:07 pm
by grafton
Hey there,

I followed the manual installation again and got things working. Not sure where I deviated.

Sorry for not updating here sooner, as well as lacking any useful info for the community. :\

But thanks again for replying so promptly! I appreciate your time. :)

Best,

G

Re: Can't login after installation - HTML file is downloaded

Posted: Mon Oct 21, 2013 11:12 am
by slansing
Well thanks for letting us know it was resolved anyways!