1

This page is aimed at Linux novices who want to require that web site visitors authenticate with usernames and passwords to access particular directories. Be forewarned that, using these methods, it will still be the case that any HCoop member can read your private files; this only "protects" directories accessed over the web.

Let's pretend that your username is billy and you have a website, www.billy.com. The files are in the directory /home/billy/www/billy.com/. You want to require a password for www.billy.com/private and give access to yourself and two friends, joe and mary. Here is what you must do:

BasicAuth /home/billy/www/htpasswd Billy's friends only. Require valid-user /Directory }}}