[ale] password protecting a website

Bradley Glonka bradley at linuxcentral.com
Fri Mar 22 06:48:34 EST 2002


In your config there should a be something that looks like this:
  <Directory /path/to/your/doc/root/>
   AllowOverride   AuthConfig 
  </Directory>

You need the AllowOverride directive and AuthConfig argument to allow 
.htaccess files to be recognized.  Once you make this change in your 
apache config you'll need to restart the server.

Also you should make certain this line is in your config:
AccessFileName .htaccess  (it probably is)


--
brad



> I am running Redhat 7.2 and currently have a website on my machine in
> (/var/www/html/index.html...). I want to password protect a webpage
> within my website. Here's what I did:
> 
> 1. created /var/www/html/protected/ (where "protected" is the directory
> where my secret files will be)
> 
> 2. created a test webpage in the protected directory and did: chmod a+r
> filename.html
> 
> 3. created .htaccess file in the */protected directory and added the
> following :
>     AuthName "Enter Password"
>     AuthType Basic
>     AuthUserFile /home/user/password
>     require valid-user
> 
> 4. I then did: chmod 640 .htaccess
> 
> 5. Under /home/user I ran: "htpasswd -c password username" and "Chmod
> 640
> password"
> 
> No Luck! What am I missing? Is it a permission problem? Thanks.
> 
> --
> Regards,
> 
> Jon Faranda
> http://redhatjon.slyip.net
> 
> 
> 


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list