LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-08-2004, 10:47 PM   #1
deflin39
LQ Newbie
 
Registered: Mar 2001
Posts: 28

Rep: Reputation: 15
apache auth


hey all

i'm trying to protect some directories in my apache tree, and so i looked into it, and this is what i got.

<Directory "/free/httproot/music">
AuthType basic
AuthName "Sercure Area"
AuthUserFile "/usr/local/apache2/passwd/passwords"
Require valid-user
</Directory>

I set up the passwords file, and it all looks good.

When i surf to the page, i do get prompted for my login, but it always fails. I cannot for the life of me figure out what I could be doing wrong. I am sure that the password file is genereated correctly, and all path names are correct, it just seems not to work right. Any ideas? Thanks

deflin39
 
Old 01-08-2004, 11:56 PM   #2
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
You typically need a .htaccess file...In that .htaccess file it also has AuthName, AuthType and AuthUserFile etc...then require valid-user
 
Old 01-09-2004, 12:34 AM   #3
ezra143
Member
 
Registered: Aug 2003
Location: NY
Distribution: RH9, RH8, Slack, Vector
Posts: 497

Rep: Reputation: 31
read me
 
Old 01-09-2004, 01:45 AM   #4
deflin39
LQ Newbie
 
Registered: Mar 2001
Posts: 28

Original Poster
Rep: Reputation: 15
This is what I was going by. It says I don't have to use .htaccess files, and it even recommends against it. (However I know alot of people use them...) Thats why i'm using httpd.conf

My problem is with apache seeming to have trouble validating the person logging in. Just wondering if I might be missing something fundamental with the setup? I do have mod_auth and mod_access loaded.

deflin39
 
Old 01-09-2004, 02:11 AM   #5
deflin39
LQ Newbie
 
Registered: Mar 2001
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks for your help everyone. I got it working now. Looks like someone needs to read their log files before posting...

"[Fri Jan 09 01:52:19 2004] [error] (13)Permission denied: Could not open password file: /usr/local/apache2/passwd/passwords"

chmod to the rescue!

deflin39
 
Old 01-09-2004, 09:17 PM   #6
Technoslave
Member
 
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
Heh, that's ok, when I was doing my RHCE test, I sat there for about 15 minutes trying to figure out why I couldn't get something to work, and I _was_ reading my log files...but sometimes what you're expecting isn't what you're reading...it happens.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
a problem about DBM auth in apache server lyz_faq Linux - Security 2 07-14-2004 07:00 PM
basic auth in apache CodeGeek Linux - Newbie 2 04-14-2004 09:27 AM
Apache Auth Password in httpd.conf ignored barlowbj Linux - Newbie 3 09-30-2003 07:42 AM
apache auth with NT antken Linux - Software 0 07-09-2002 07:11 AM
Apache 1.3 and basic auth luger Linux - Networking 4 05-17-2002 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:05 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration