Apache htpasswd Usage Creating and Adding Users Accounts
How to create/add user to apache password file. StepsOn Windows XP Pro Start / Run /cmd (brings up the dos prompt) cd (drive)\(Apache directory)\bin Then run one of the following commands |
This creates a file named filename.txt with a username of user and a password of pass.
htpasswd -cbm filename.txt user pass |
This adds the username user1 and password pass to filename.txt
htpasswd -bm filename.txt user1 pass |
#Where to find or create the needed files C:\(Apache directory)\htdocs\(protected directory) = ht.acl C:\(Apache directory)\bin = (nameofpasswordfile).txt C:\(Apache directory)\conf = httpd.conf |
AuthName "popup message when asking for username and password" AuthType Basic AuthUserFile C:/(Apache directory)/bin/(nameofpasswordfile).txt Require valid-user |
#Where to put in the httpd.conf #I put the new entries under this entry <Directory "C:/(Apache directory)/htdocs"> #...some data </Directory> #Added for password files #Added ht.acl because windows does not like .htaccess AccessFileName ht.acl .htaccess #Added for password protected directory <Directory "C:\(Apache directory)\htdocs\(protected directory)"> AllowOverride All Order deny,allow Options None </Directory> |
Post a comment for www.mgwalk.com

