Page 1 of 1
Basic HTTP authentication
Posted: Fri Jan 24, 2003 1:59 pm
by jamal
hi GUys
Please this may sound too elementary but
I need your help.
How can I configure apache httpd.con file in
order to support the use of Basic HTTP authentication.
I am using apache 1.3.26 on windows.
Thanks
Posted: Fri Jan 24, 2003 4:57 pm
by patrikG
Posted: Sat Jan 25, 2003 7:47 am
by jamal
can anyone please help me on how to properly configure the directives.
I use apache 1.3.26 on win98.
this is what I have in my httpd.con file
<Directory “c:/inetpub/wwwroot/http_cookie”>
AuthUserFile c:/inetpub/wwwroot/http_cookie
AuthName "Enter Username and Password"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
</Directory>
Please help if you can.
Thanks
Posted: Sun Jan 26, 2003 4:48 pm
by Stoker
The configuration seems ok, except that your authuserfile must be a file somewhere (not a directory) and should never be in the web area, you should put it somewhere else, such as
AuthUserFile c:/mysecrets/htpasswd
Then you must create that file, easiest way to do that is using the binary htpasswd that comes with apache
The first user you create with the -c option so that the file is created, after that you add new users at will
mkdir c:\mysecrets
htpasswd -c c:\mysecrets\htpasswd myusername
htpasswd c:\mysecrets\htpasswd someotherusername