homepage Welcome to WebmasterWorld Guest from 107.21.187.131
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Restricted directory
how to setup
Trusty




msg:914459
 9:58 am on Feb 27, 2003 (gmt 0)

Hello folks!

How and where in apache setup restricted directory.
Example: when user click to restricted dir. must appear login window
let's say www.widgets.com/members/ ==>> so members area is restricted directory, under this directory I'll use .htaccess,.htpasswd.
Sorry for bad English.

Thanks for any help.

Have a nice day :)

 

hakre




msg:914460
 10:31 am on Feb 27, 2003 (gmt 0)

hi trusty,

you'll need both files for. the .htaccess to tell the webserver that a specific directory is restricted (i.e. the current one) and a .htpasswd file in which the username(s) and password(s) are stored.

in the .htaccess file place the following text:

AuthType Basic
AuthName "restricted"
AuthUserFile .htpasswd
require valid-user

in the .htpasswd file you put username and password seperated by a : (double-point). the password is encrypted. you can use a commandline tool or an online tool (look for .htpasswd and crypt) to encrypt your password. that's all.

martin




msg:914461
 1:20 pm on Mar 1, 2003 (gmt 0)

If you have Satisfy Any in a parent directory you'll also have to add Satisfy All in the protected one.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved