templating - auth basic support

This commit is contained in:
bunkerity
2021-05-25 12:18:40 +02:00
parent 289ad106cb
commit 23aa053003
4 changed files with 13 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
auth_basic "{{ AUTH_BASIC_TEXT }}";
auth_basic_user_file {{ NGINX_PREFIX }}.htpasswd;
auth_basic_user_file {{ NGINX_PREFIX }}htpasswd;

View File

@@ -1,4 +1,4 @@
location {{ AUTH_BASIC_LOCATION }} {
auth_basic "{{ AUTH_BASIC_TEXT }}";
auth_basic_user_file {{ NGINX_PREFIX }}.htpasswd;
auth_basic_user_file {{ NGINX_PREFIX }}htpasswd;
}

3
confs2/site/htpasswd Normal file
View File

@@ -0,0 +1,3 @@
{% if USE_AUTH_BASIC == "yes" %}
{{ AUTH_BASIC_USER }}:{{ sha512_crypt(AUTH_BASIC_PASSWORD) }}
{% endif %}