[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
Re: Using Apache
What I've got in .htaccess thats relevant is is:
AuthPAM_Enabled off
AuthType Basic
AuthName "UKHA Archives"
AuthGroupFile /dev/null
AuthUserFile <path_to>/htpasswd
require valid-user
You may or may not need the AuthPAM_Enabled thing. From memory, it
dissuades apache from using native unix accounts on the machine as a
source of credentials.
In another directory (the one pointed to by <path_to>) I've got the
password file itself, which is called htpasswd. The name is not
magic, any name will do, and the one I've chosen (and I cant
remember why) is probably not most sensible - its the same as the
executable that creates the file.....
I've then got a little script:
rm htpasswd
/usr/sbin/htpasswd -c <path_to>/htpasswd $1
which I run to recreate the password file with just one entry, the
user name, and the htpasswd executable then prompts for the password.
I'd recommend a man htpasswd to see how to use it more appropriately
than I am, so you update it rather than delete and recreate, but my
way is fine for a single user system.
The htpasswd file looks like (and I've changed a few letters!):
archive:xUCPkA/Tkln1c
It took hours to get this working, even though its so simple.
A couple of references that may help (or may confuzzle you further :-
) are:
http://httpd.apache.org/docs-2.0/howto/auth.html
http://www.apacheweek.com/features/userauth
UK Home Automation Meet 2004 - BOOK NOW!
http://www.ukha2004.com
http://www.automatedhome.co.uk
Member Offers - http://www.freeranger.co.uk/ukha
Home |
Main Index |
Thread Index
|