-c option to create new file. To append leave out the -c option. htpasswd file should be in your apache bin directory. Location of this password file is depends by .htaccess file. You can use any filename. Above just for example.
There are slight syntax variations between unix and Windows. What platform are you running? The unix version is demonstrated above. Newposter
"Good judgment comes from experience. Experience comes from bad judgment."
I'm running Win2K. I have the .htaccess file in the place, but it didn't pick it up.
This is what I did:
content of the .htaccess file resides in the folder that want to be protected:
---------
AuthUserFile C:\Program Files\Apache Group\Apache2\bin\.htpasswd
AuthName "username"
AuthType Basic
<File *>
<Limit GET>
require user-valid
</Limit>
</Files>
----------
from the command line
C:\Program Files\Apache Group\Apache2\bin>htpasswd -b .htpasswd username password
----------
when I accessed the folder that had .htaccess sits in it, it didn't pop up a login screen or anything.
What's the problem? is there anything that I need to configure in httpd.conf?
Not sure about NT environment, but can you try put <Directory> access in httpd.conf. Within that <Directory> make sure you have line AllowOverwrite AuthConfig. Restart your httpd.
I cliked on Submit Post before I was done...
It should really read
[tt]AuthUserFile "C:/Program Files/Apache Group/Apache2/bin/.htpasswd"[/tt] //Daniel
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.