WSGIDaemonProcess execdb user=apache group=apache threads=5
WSGIScriptAlias /{{ execdb_endpoint }} /usr/share/execdb/execdb.wsgi
WSGISocketPrefix run/wsgi

# this isn't the best way to force SSL but it works for now
#RewriteEngine On
#RewriteCond %{HTTPS} !=on
#RewriteRule ^/execdb/admin/?(.*) https://%{SERVER_NAME}/$1 [R,L]

<Directory /usr/share/execdb>
    WSGIProcessGroup execdb
    WSGIApplicationGroup %{GLOBAL}
    WSGIScriptReloading On
    <IfModule mod_authz_core.c>
        # Apache 2.4
        <RequireAny>
            Require method GET
            Require ip 127.0.0.1 ::1{% for host in allowed_hosts %} {{ host }}{% endfor %}

        </RequireAny>
    </IfModule>
    <IfModule !mod_auth_core.c>
        Order allow,deny
        Allow from all
    </IfModule>

</Directory>

#Alias /execdb/static /var/www/execdb/execdb/static

#<Directory /var/www/execdb/execdb/static>
#Order allow,deny
#Allow from all
#</Directory>
