Apache simple auth

| | Comments (0)

Example:
Add auth in directory /home/pank/public_html/auth
User pank, password 1111

  1. Create .htaccess (in /home/pank/public_html/auth)
    AuthName "Simple Auth"
    AuthType Basic
    AuthUserFile "/home/pank/public_html/auth/.htpasswd"
    require valid-user
  2. Create .htpasswd
    htpasswd -cb .htpasswd pank 1111
    (-c for Create a new file, -b for Use the password from the command line rather than prompting for it)
    htpasswd -b .htpasswd test 2222
  3. Edit httpd.conf
    <Directory "/home/pank/public_html/auth">
      AllowOverride All
    </Directory>
  4. Restart Apache

Leave a comment

March 2009

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

About this Entry

This page contains a single entry by Pank published on February 16, 2005 11:20 AM.

dd for windows was the previous entry in this blog.

eXeem is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.