Welcome to the most active Linux Forum on the web.
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 06-01-2009, 09:52 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
.htaccess password protection not working

I have an apache2 install on a debian etch box, and I'd like to protect my www with htaccess password
first, I created a file I called .htpasswd on a secure location with
htpasswd -c .htpasswd username
then I created a .htaccess file on my www containing :

AuthUserFile path to my /.htpasswd
AuthGroupFile /dev/null
AuthName "EnterPassword"
AuthType Basic

require valid-user
when I try to access to a page stored in www, i dont get the dialog box, the page is displayed without restruction, I'd like to know whether there is something else I should consider to make password protection working ?
Old 06-01-2009, 10:01 PM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try adding

AllowOverride AuthConfig

Is there anything in your logs?
Old 06-03-2009, 06:31 AM   #3
LQ Newbie
Registered: Feb 2008
Location: Rotterdam, Netherlands
Distribution: Fedora and Ubuntu
Posts: 14

Rep: Reputation: 1
Like billymayday says: you need to allow your webpage to use .htaccess files. Enter the directive AllowOverride AuthConfig in your Apache configuration for your website (and don't forget to restart Apache afterwards).
Old 06-04-2009, 02:02 PM   #4
LQ Newbie
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
thank you guys, it works


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
kppp password protection bong.mau Linux - Software 1 11-11-2007 08:31 AM
Password Protection How? saheelahamed Linux - Software 0 10-08-2007 12:22 AM
Password Protection In CGI amit_28oct Programming 8 06-24-2004 02:22 AM
password protection kushal Linux - Security 4 10-10-2002 09:33 PM
Password Protection TheSockMonster Linux - Newbie 1 05-27-2002 11:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:27 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