Added commands to change permissions on htpasswd file
This commit is contained in:
parent
de4e6cdfb1
commit
22348a8caf
@ -20,8 +20,10 @@ While KeePass includes encryption for our password storage, we also want another
|
|||||||
To start, you'll want to add a .htpasswd file for the credentials to be stored in - I put mine in /etc/apache2 using the following command:
|
To start, you'll want to add a .htpasswd file for the credentials to be stored in - I put mine in /etc/apache2 using the following command:
|
||||||
``` bash
|
``` bash
|
||||||
sudo htpasswd -c /etc/apache2/.htpasswd username
|
sudo htpasswd -c /etc/apache2/.htpasswd username
|
||||||
|
sudo chown www-data:www-data /etc/apache2/.htpasswd
|
||||||
|
sudo chmod 600 /etc/apache2/.htpasswd
|
||||||
```
|
```
|
||||||
This will prompt you to enter a password, and will save it to that file. You'll want to run this as root, to have write access.
|
This will prompt you to enter a password, and will save it to that file. The permissions are also then changed to allow Apache to read the file, and to prevent other users from reading it.
|
||||||
|
|
||||||
You can then add the following to your VirtualHost configuration, to enable the authentication:
|
You can then add the following to your VirtualHost configuration, to enable the authentication:
|
||||||
``` apache
|
``` apache
|
||||||
|
Loading…
x
Reference in New Issue
Block a user