... | ... | @@ -39,7 +39,7 @@ mv htaccess.txt .htaccess |
|
|
|
|
|
For the `.htaccess` to be taken into account by Apache, you must add the following to your VirtualHost file:
|
|
|
```apache
|
|
|
<Directory /var/www/framadate>
|
|
|
<Directory /var/www/html/framadate>
|
|
|
AllowOverride All
|
|
|
</Directory>
|
|
|
```
|
... | ... | @@ -56,13 +56,13 @@ Create a `.htaccess` file inside `admin/` and put the following content: |
|
|
```apache
|
|
|
AuthType Basic
|
|
|
AuthName "Administration"
|
|
|
AuthUserFile "/var/www/framadate/admin/.htpasswd"
|
|
|
AuthUserFile "/var/www/html/framadate/admin/.htpasswd"
|
|
|
Require valid-user
|
|
|
```
|
|
|
|
|
|
Then create the `.htpasswd` file with the following command (you may need to install the package `apache2-utils`) where you change the values for user and password to your convenience:
|
|
|
```bash
|
|
|
sudo -u www-data htpasswd -bc /var/www/framadate/admin/.htpasswd user password
|
|
|
sudo -u www-data htpasswd -bc /var/www/html/framadate/admin/.htpasswd user password
|
|
|
```
|
|
|
|
|
|
### Secure htaccess and htpassword
|
... | ... | |