LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2002, 11:01 AM   #1
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Rep: Reputation: 15
setting passwords with apache


I have been tring to password protect a directory on my webserver and I can't get it to work. I have read on pages on the internet about the subject but I guess I am stupid. I have Redhat 8.0 with apache 2.0.40. I have created a .htaccess file in the folder I want to protect. /var/www/html/private
Its contents are as follows:

AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName "personal"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>
I was also playing with permissions to. The .htaccess file is currently set:
Owner: apache
group: root
rwxr-xr-x

the .htpasswd file is located in /var/www
its contents are in the format

user:encrypted password

the permissions include
owner: root
group: root
rwxr-xr-x

I have started and stopped the httpd service numerous times and when I go to the private folder on the website it just displays my directory without any password boxes or anything. I created the .htpasswd with the htpasswd -c command. I don't know what I am doing wrong. Any suggestions would be greatly appricated. Thanks.

Jamie
 
Old 11-24-2002, 04:40 PM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
What about the httpd.conf? You need the AllowOverride directive set on the directory you want to protect. So you can either use the .htaccess configuration or include it directly in the httpd.conf

For more information, check http://httpd.apache.org/docs-2.0/howto/htaccess.html
 
Old 11-24-2002, 08:32 PM   #3
lowly_tech
Member
 
Registered: May 2001
Posts: 34

Original Poster
Rep: Reputation: 15
thanks for the reply

I appricate your response. I tryed to put the overide line in the conf file but I guess I got the syntax wrong cause httpd wouldn't load. Anyway I put the the path in a <directory> section of the conf file and it works. I guess all the howtos I found were all 1.3 and not 2.x. Thanks again for your help.

Jamie
 
  


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
info about vsftpd, apache and xinetd, setting up a webserver with users and passwords Grifter Linux - Newbie 7 07-13-2005 10:40 PM
Making apache .htaccess use unix passwords Mikessu Linux - Networking 0 07-01-2004 01:05 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM
Setting up SSH to accept authenticate hosts without passwords jphaynes Slackware 4 05-05-2002 11:33 AM
Apache and passwords marcoc Linux - Networking 2 05-02-2002 04:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04: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
Open Source Consulting | Domain Registration