Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Password Protecting Directories With .htaccess

In .htaccess:

   1  
   2  AuthUserFile (your path here)/.htpasswd
   3  AuthGroupFile /dev/null
   4  AuthName hold
   5  AuthType Basic
   6  <Limit GET>
   7  require valid-user
   8  </Limit>


Then su to same directory with SSH and:

   1  
   2  root> htpasswd -c .htpasswd (username)


At the prompts, enter and reenter the password. Done.
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS