Posted By

endorfin on 01/10/09


Tagged

htaccess apache


Versions (?)

Apache - Password protect a Directory


 / Published in: Apache
 

  1. cd /this/dir/is/secure
  2.  
  3. ### create .htpasswd
  4. htpasswd -c .htpasswd user1
  5.  
  6. ### add a new user
  7. htpasswd .htpasswd user2
  8.  
  9. ### .htaccess
  10. AuthUserFile .htpasswd
  11. AuthName "Ric's protected files"
  12. AuthType Basic

Report this snippet  

You need to login to post a comment.