Apache 2, quickly protect directory with password

From Andreida
Revision as of 11:27, 16 February 2016 by Andreas (talk | contribs) (Created page with "* Create file with encrypted password htpasswd -c /etc/apache2/.passwd yourname * Create file ".htaccess" in folder to protected (subfolders are protected too) <pre> AuthUse...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • Create file with encrypted password
htpasswd -c /etc/apache2/.passwd yourname
  • Create file ".htaccess" in folder to protected (subfolders are protected too)
AuthUserFile /etc/apache2/.passwd
AuthType Basic
AuthName "protecting work in progress"
Require valid-user