LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-11-2011, 02:43 PM   #16
LMW
Member
 
Registered: Oct 2010
Location: Russia / USA
Distribution: Arch Linux
Posts: 36

Original Poster
Rep: Reputation: 2

Quote:
Originally Posted by bathory View Post
What does this rewrite do anyway?
Could you comment it out and see if it works?
You can also take a look at this howto for more configuration details on debian
Already tried to comment that rewrite line - Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.
 
Old 05-11-2011, 08:55 PM   #17
LMW
Member
 
Registered: Oct 2010
Location: Russia / USA
Distribution: Arch Linux
Posts: 36

Original Poster
Rep: Reputation: 2
OK, a little update. I've been reading through Internet and found out, that "403 error" usually occurs when nginx can't properly read password file (that is possible when password in such file is not properly encrypted).

And one more strange thing. When I've changed the path to password file

from:

Code:
"auth_basic_user_file /etc/nagios3/conf.d/htpasswd;"
to:

Code:
"auth_basic_user_file /etc/nagios3/htpasswd.users;"
"Login loop" started(of course I've created that new "htpasswd.users" file before that). I can't authorize at all! I've tried to generate password using Apache's htpasswd util, but with no success. Can anyone shed more light on that?

Last edited by LMW; 05-11-2011 at 08:57 PM.
 
Old 05-12-2011, 12:49 AM   #18
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Quote:
Already tried to comment that rewrite line - Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.
I guess this is because you use: location /nagios3/ and root /usr/share/nagios3/htdocs. With this root, the location has to be /, but you said you get a prompt to download a file when you do that!
I suggest you to make a backup of your config files and try to follow the tutorial of my previous post. According to that, put the nagios stuff inside a /etc/nginx/sites-enabled/default (maybe because of the way debian configures vhosts) and leave nginx.conf with the basics.

BTW, to create a password using htpasswd, you can run:
Code:
htpasswd -d -c /etc/nagios3/conf.d/htpasswd username
If you want to change the password of that user omit the -c switch.
You can also try the perl command in the tutorial above.

Last edited by bathory; 05-12-2011 at 02:49 AM. Reason: htpasswd syntax
 
Old 05-12-2011, 11:03 AM   #19
LMW
Member
 
Registered: Oct 2010
Location: Russia / USA
Distribution: Arch Linux
Posts: 36

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by bathory View Post
Hi,


I guess this is because you use: location /nagios3/ and root /usr/share/nagios3/htdocs. With this root, the location has to be /, but you said you get a prompt to download a file when you do that!
I suggest you to make a backup of your config files and try to follow the tutorial of my previous post. According to that, put the nagios stuff inside a /etc/nginx/sites-enabled/default (maybe because of the way debian configures vhosts) and leave nginx.conf with the basics.

BTW, to create a password using htpasswd, you can run:
Code:
htpasswd -d -c /etc/nagios3/conf.d/htpasswd username
If you want to change the password of that user omit the -c switch.
You can also try the perl command in the tutorial above.
Thank you for your help. However, this problem was solved by moving "root" and "index" directives from "location" part to global. Now it's working as intended.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios 403 Forbidden error in monitoring localhost mtimbro Linux - Software 4 06-12-2008 01:42 PM
Apache, nagios and 403 forbidden gfem Fedora 1 10-04-2007 02:43 PM
Mysterious 403 error intramaweb Linux - Software 4 06-01-2006 05:42 PM
can't get anything but error 403 kuplo Linux - Software 2 11-02-2005 10:11 AM
Nagios (403 Error) cuiguy Linux - Software 1 04-05-2005 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration