LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 06-01-2009, 09:52 PM   #1
m0ntassar
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
Code:
htpasswd -c .htpasswd username
then I created a .htaccess file on my www containing :

Code:
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
billymayday
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
paul81
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
m0ntassar
LQ Newbie
 
Registered: Oct 2008
Posts: 4

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


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
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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration