Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-24-2002, 12:01 PM   #1
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
I was also playing with permissions to. The .htaccess file is currently set:
Owner: apache
group: root

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

user:encrypted password

the permissions include
owner: root
group: root

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.

Old 11-24-2002, 05:40 PM   #2
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
Old 11-24-2002, 09:32 PM   #3
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.



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

All times are GMT -5. The time now is 04:08 AM.

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