Meine kleine Dokumentation

Die Installationsdokumentation zu MeineKleineFarm.net

Benutzer-Werkzeuge

Webseiten-Werkzeuge


apache2_basic_authentication

Dies ist eine alte Version des Dokuments!


Apache2 Basic Authentication

Quelle: https://httpd.apache.org/docs/current/howto/auth.html

Create user & password hash file with bcrypt encryption for passwords.

htpasswd -B -c /etc/apache2/.htpasswd demo-user New password: Re-type new password: Adding password for user demo-user </code> Add additional user to existing file.

htpasswd -B /etc/apache2/.htpasswd demo-user2
New password:
Re-type new password:
Adding password for user demo-user2

Enable Basic Authentication in Apache2 conf file.

default.conf
<Directory /var/www/html/example.org/>
     AuthType Basic
     AuthName "Basic Authentication"
     AuthUserFile /etc/apache2/.htpasswd
     Require valid-user
</Directory>
apache2_basic_authentication.1478210411.txt.gz · Zuletzt geändert: 2016/11/03 22:00 von xenadmin