Solved

.htaccess file

Posted on 2004-09-03
4
2,277 Views
Last Modified: 2012-05-05
it seems to me that ever since i have put the .htaccess file in /usr/local/nagios/sbin

i haven't been able to access the cgi-bin dir from the webserver (apache)
i get the permissions error.

HOW do i delete the .htaccess file
the four lines in that .htaccess files are

AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user
0
Comment
Question by:jibranilyas
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
mikebernhardt earned 500 total points
ID: 11974492
What do you mean, how do you delete it? If you're on UNIX, just cd into the directory and type rm .htaccess.

What do you mean about an apache permissions error- permission getting to your pages or permission running apache?

That file appears to be requiring authentication via the file AuthUserFile /usr/local/nagios/etc/htpasswd.users. If you don't have that then you can't authenticate to see the pages.

If you're having problems running apache, then maybe the permissions on your .htaccess file are wrong. It needs to be readable by whatever user owns apache.
0
 

Author Comment

by:jibranilyas
ID: 11974657
ok here are the answers

I am using RedHat 8.0  
i didn't see .htaccess file in /usr/local/nagios/sbin folder.... it may be hidden...   well, i will remove that from the command prompt..

if i use file browser, i can get to that location ( /ur/local/nagios/sbin ) but its not accessible thru the webserver.
in httpd.conf, i have
ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory "/usr/local/nagios/sbin/">
    AllowOverride AuthConfig
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

--
I have full permissions to the path /usr/local/nagios/etc/htpasswd.users.. i have opened the file and read encrypted passwords.


"If you're having problems running apache, then maybe the permissions on your .htaccess file are wrong. It needs to be readable by whatever user owns apache."
THIS may be it
I am logged in under root...
how do i give access of APACHE to root..
there is a user and group line in Apache's httpd.conf file i think.. do i have to edit that?

sorry, i m a newbie in linux ... THANKS for your time.

 
0
 

Author Comment

by:jibranilyas
ID: 11974705
again, before putting that .htaccess file in the sbin folder, i was able to atleast view the cgi pages..  

ON THOSE CGI PAGES, i got this error
here is the URL ( got it from "copy link location" on the link ) where i got the error
http://localhost/nagios/cgi-bin/status.cgi?hostgroup=all&style=hostdetail

"It appears as though you do not have permission to view information for any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file."
0
 
LVL 28

Expert Comment

by:mikebernhardt
ID: 11974838
You know, this is getting beyond me. But there is an Apache topic you can post this question in, you'd get better help there. The one thing I can tell you though is that files that start with . are hidden. To see them you have to add the -a option to your ls commands i.e. ls -a or ls -al.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Don’t let your business fall victim to the coming apocalypse – use our Survival Guide for the Fax Apocalypse to identify the risks and signs of zombie fax activities at your business.
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now