Catégorie : Linux
Affichages : 1552
Imprimer

Le .htaccess :

AuthUserFile /etc/apache2/htpasswd
AuthName "Accès protégé"
AuthType Basic

<Limit GET POST>
Require valid-user
</Limit>

sites-available :

<Directory /var/www/>
Options Indexes Includes FollowSymlinks MultiViews
AllowOverride AuthConfig
Order allow,deny
Allow from all

</Directory>

commande :

htpasswd -c /etc/apache2/htpasswd user

puis htpasswd /etc/apache2/htpasswd user2 etc.....

| + - | RTL - LTR