Skip to content

Instantly share code, notes, and snippets.

@tannerhodges
Created January 5, 2015 17:23
Show Gist options
  • Save tannerhodges/99d47bf720aa43de1605 to your computer and use it in GitHub Desktop.
Save tannerhodges/99d47bf720aa43de1605 to your computer and use it in GitHub Desktop.
Password protect a directory using basic authentication
# Password protect a directory using basic authentication
# https://wiki.apache.org/httpd/PasswordBasicAuth
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /var/www/vhosts/.htpasswd
Require valid-user
# To update the user's password, use the following:
# htpasswd /var/www/vhosts/.htpasswd username
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment