{%- if site.auth is defined %} | |
{%- if site.auth.engine == 'basic' %} | |
auth_basic "Restricted"; | |
{%- if site.auth.htpasswd is defined %} | |
auth_basic_user_file /etc/nginx/{{ site.auth.htpasswd }}; | |
{%- else %} | |
auth_basic_user_file /etc/nginx/htpasswd; | |
{%- endif %} | |
{%- endif %} | |
{%- endif %} |