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

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
grafton
Posts: 7
Joined: Wed Jun 12, 2013 8:33 pm

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

Post 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. :)
Attachments
nagios.txt
File downloaded when navigating to <my_ip_address>/nagios. It is normally 'nagios', but I needed to append .txt to upload here.
(1.57 KiB) Downloaded 138 times
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post 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.
grafton
Posts: 7
Joined: Wed Jun 12, 2013 8:33 pm

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

Post 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. :\
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
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.
grafton
Posts: 7
Joined: Wed Jun 12, 2013 8:33 pm

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

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

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

Post by slansing »

Well thanks for letting us know it was resolved anyways!
Locked