{% for share in nas_shares %} {% if share.protocols.http.enabled %} Alias /{{ share.name }} {{ item.path | default(nas_root_dir + '/data/' + item.name) }} RewriteEngine On {% if share.protocols.http.force_ssl %} RewriteCond %{HTTPS} =off RewriteRule ^/{{ share.name }}(/.*|$) https://%{HTTP_HOST}/{{ share.name }}$1 {% endif %} Options None Options +FollowSymlinks {% if share.protocols.http.force_ssl %} SSLRequireSSL On {% endif %} {% if share.protocols.http.indexes %} Options +Indexes {% endif %} {% endif %} {% endfor %}