# Root directory goes to Lokole web server

RedirectMatch ^{{ lokole_url }}$ {{ lokole_url }}/

ProxyRequests off
ProxyPass {{ lokole_url }}/ unix:{{ lokole_domain_socket }}|http://{{ iiab_hostname }}.{{ iiab_domain }}/

<Location {{ lokole_url }}/>
  ProxyPassReverse /
  ProxyHTMLEnable On
  ProxyHTMLURLMap / {{ lokole_url }}/
  RequestHeader unset Accept-Encoding
</Location>

# /static directory is stored on filesystem
Alias {{ lokole_url }}/static {{ lokole_install_path }}

<Directory {{ lokole_install_path }}>
    Options Indexes FollowSymLinks

    # Don't allow modifications in static directory
    Require all granted
    <LimitExcept GET HEAD OPTIONS>
        Require all denied
    </LimitExcept>
</Directory>

# Disable TRACE to prevent cross-site tracing
TraceEnable off
