# Access log configuration
{% for slave, directory in slave_log_directory.iteritems() %}
https://[{{ parameter_dict['global_ipv6'] }}]:{{ parameter_dict['https_port'] }}/{{ slave }}, https://{{ parameter_dict['local_ipv4'] }}:{{ parameter_dict['https_port'] }}/{{ slave }} {
  bind {{ parameter_dict['local_ipv4'] }}
  root {{ directory }}/
  browse
  tls {{ parameter_dict['ip_access_certificate'] }} {{ parameter_dict['ip_access_certificate'] }}
  basicauth "{{ slave }}" {{ slave_password[slave] | trim }} {
    "Log Access {{ slave }}"
    /
  }
  log / {{ parameter_dict['access_log'] }} "{remote} - {>REMOTE_USER} [{when}] \"{method} {uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {latency_ms}"
  errors {{ parameter_dict['error_log'] }} {
    * {{ parameter_dict['not_found_file'] }}
  }
}
{% endfor %}
