-
Copy
src/auth/index.php
into any HTTP/HTTPS server.
-
Create
.htaccess
in the same directory. Its contents is as follows
AuthUserFile DIRECTORY_NAME/.htpasswd
AuthName GROUP-NAME
AuthType Basic
<Limit GET>
require valid-user
</Limit>
where DIRECTORY_NAME is the full-path to the directory where index.php
locates,
GROUP-NAME is the appropriate owner group in that server.
-
Create password file and add first user with the following command:
htpasswd -cm DIRECTORY_NAME/.htpasswd USER_NAME1
chgrp GROUP-NAME DIRECTORY_NAME/.htpasswd
chmod o-w DIRECTORY_NAME/.htpasswd
whrere USER_NAME1 is the name of the first user.
-
Add other users (USER_NAME2) as follws:
htpasswd -m DIRECTORY_NAME/.htpasswd USER_NAME2
-
The previous command is also used to change the password for any user (USER_NAME).
htpasswd -m DIRECTORY_NAME/.htpasswd USER_NAME
-
To remove authentification for any user (USER_NAME), please type
htpasswd -D DIRECTORY_NAME/.htpasswd USER_NAME