You are here

.htaccess based authentication with apache

Ivan Radovanovic's picture

Put this in .htaccess file

AuthUserFile path_goes_here
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require valid-user

File with usernames and passwords can be generated with htpasswd path username utility from command line, or use the following line to display hashed pairs in console htpasswd -n username