htaccess without htpasswd

in nginx config:
auth_basic              "-- Clasified area --";
auth_basic_user_file    /var/www/htpasswd;


In apache config:
The htaccess file:
AuthName "-- Clasified area --"
AuthType Basic
AuthUserFile /var/www/htpasswd
require valid-user

The file can be created by: 
# echo "user:$(openssl passwd -apr1)" >> /var/www/htpasswd
Dette indlæg blev udgivet i Knowledge Base. Bogmærk permalinket.

Skriv et svar