Skip to main content

Using digest authentication is easy with apache


All you need to do is stick something like this in httpd.conf...

<Location />
AuthType Digest
AuthName "Secure Stuff"
AuthDigestDomain /

AuthDigestProvider file
AuthUserFile /var/www/auth/.digest_pw
Require valid-user
</Location>

and then type ...

htdigest -c /var/www/auth/.digest_pw 'Secure Stuff' admin



  • in the above, admin of course is the user. 
  • Where I've typed "Secure Stuff" needs to equal each other 
  • the -c option with htdigest will create a new file and overwrite any other users you have created
  • With AuthDigestDomain, you can specify multiple locations covered by the same auth.  
    • everything underneath is covered automatically 
    • You can include relative URI's or absolute URI (inc domain) 
    • apache gives the example, AuthDigestDomain URI [URI] ... or AuthDigestDomain /private/ http://mirror.my.dom/private2/ 


Comments

Popular posts from this blog

Javascript Form Validation

It's real simple. All you need to do is call a javascript function in a html  " onsubmit " in the form tag as a javascript return, like this       <form method="post" action="dosomething.php" onsubmit="return validateForm();"> If the code completes ok, the form is then sent to the page listed in "action" http://www.w3schools.com/js/js_form_validation.asp If the function specified in the onsubmit returns false, then the form is not sent to the page mentioned in action.