Disable authentication and short url

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
reistlin
Posts: 3
Joined: Mon Mar 11, 2013 11:22 pm

Disable authentication and short url

Post by reistlin »

Hi all.
I have debian 6 and nagios 3 core .
1) I set
  • use_authentication=1
    default_user_name=guest
    authorized_for_system_information= *
    authorized_for_configuration_information=*
    authorized_for_system_commands=*
    authorized_for_all_services=*
    authorized_for_all_hosts=*
    authorized_for_all_service_commands=*
    authorized_for_all_host_commands=*
But i login in 192.168.1.1/nagios3 and it need to authorization . How to disable this?

2)How to make short url ? Connect to nagios type 192.168.1.1 instead of 192.168.1.1/nagios3
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Disable authentication and short url

Post by abrist »

What guide did you follow? Did you setup basic authentication? (htpasswd)
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.
reistlin
Posts: 3
Joined: Mon Mar 11, 2013 11:22 pm

Re: Disable authentication and short url

Post by reistlin »

abrist wrote:What guide did you follow? Did you setup basic authentication? (htpasswd)
It is russian article http://ubuntologia.ru/nagios
Yes, i add nagiosadmin and guest to htpasswd (htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin)
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Disable authentication and short url

Post by abrist »

Does it work without auth? Just to test that the rest of the config is working, set:

Code: Select all

use_authentication=0
And restart apache/nagios. If it is working, we will drill down the auth problem.
reistlin wrote: 2)How to make short url ? Connect to nagios type 192.168.1.1 instead of 192.168.1.1/nagios3
There are a couple of ways. Most people edit their apache vhost setup to taste. You could use dns to do so as well.

What does your nagios apache vhost config look like?
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.
reistlin
Posts: 3
Joined: Mon Mar 11, 2013 11:22 pm

Re: Disable authentication and short url

Post by reistlin »

abrist wrote:Does it work without auth? Just to test that the rest of the config is working, set:

Code: Select all

use_authentication=0
And restart apache/nagios. If it is working, we will drill down the auth problem.
I set use_authentication=0 and restart apache/nagios, but it is still requires authentication. Maybe problem in apache ?
abrist wrote: There are a couple of ways. Most people edit their apache vhost setup to taste. You could use dns to do so as well.
What does your nagios apache vhost config look like?
My 000-default file is:

Code: Select all

<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /var/www
	
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Disable authentication and short url

Post by abrist »

Do you have a specific vhost file for nagios? I noticed that you have your cgi-bin directories declared, but are your nagios html files in the /var/www directory?
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.
Locked