Next: FormsMailer
Up: Some Local Conventions
Previous: How to use it
Access control can be directory tree-level or file level.
To try to access a file or a directory tree the browser should demand a
username and a password, and not give you access to the file unless you
qualify. In case you are using a browser unable to handle authentication,
you will not get access to the document at all.
Step by step instructions:
1. Create a Protection Setup file (for example .htaccess) in your
directory with the following structure:
AuthName
"MinuServer"
- server's name (free text)
AuthType
Basic
AuthUserFile
/home/XXXXXX - full file's name
require
valid-user
2. Create the password file (for example .htpasswd).
The easiest way to do this is to use the htpasswd program. Do this:
/opt/apache/bin/htpasswd -c
<passwordfile>
3. To add a user to the password file (fails if there already is a user
by that name).
/opt/apache/bin/htpasswd
<passwordfile> <username> <password>
or
/opt/apache/bin/htpasswd
<passwordfile>
4. To change a user's password (fails if there is no such user).
/opt/apache/bin/htpasswd
<passwordfile>
5. After that you need to ask the system administrator to finish the
protection installation and inform him what you want to protect and where
the protection setup file is located.
Rein Lõugas