Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 01-11-2004, 02:17 AM   #1
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 12.04 - Server 12.04.4 LTS
Posts: 939

Rep: Reputation: 32
protected directories

protected directories

hello tommy here

my .htaccess file is in the folder i wish to protected

AuthType Basic
AuthName Authentication Required!!
AuthUserFile /var/www/secure/.htpasswd
Require user <username>

after creating the .htaccess file i put the following command in

htpasswd -c /someotherdir/.htpasswd <username>

it asked for a password so that seem to work.

it created my usr and pass in the.htpasswd file.


I restarted the httpd and no go..
am i missing some thing...

Old 01-11-2004, 08:26 AM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Make sure you have set:
AllowOverride AuthConfig

For that directory in httpd.conf. You only need to restart httpd when changes are made to httpd.conf
Old 01-11-2004, 10:34 PM   #3
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Also the "/someotherdir/.htpasswd" should be the same as what is specified by AuthUserFile in your .htaccess.


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
video streaming in .htaccess password protected directories Houseofcyn Linux - Newbie 1 12-20-2004 02:05 PM
Apache2: showing password protected directories hamish Linux - Software 7 11-15-2004 12:50 PM
add image to protected directories login box tommytomato Linux - Newbie 2 05-25-2004 08:37 AM
password protected directories dsgdevil Linux - General 1 02-17-2003 12:02 AM
Password Protected Directories TheSockMonster Linux - Security 2 05-31-2002 04:07 PM > Forums > Linux Forums > Linux - Security

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

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