Listen %PORT%

<VirtualHost *:%PORT%>
    WSGIDaemonProcess senlin-api processes=2 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
    WSGIProcessGroup senlin-api
    WSGIScriptAlias / %SENLIN_BIN_DIR%/senlin-wsgi-api
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    AllowEncodedSlashes On
    <IfVersion >= 2.4>
      ErrorLogFormat "%{cu}t %M"
    </IfVersion>
    ErrorLog /var/log/%APACHE_NAME%/senlin-api.log
    CustomLog /var/log/%APACHE_NAME%/senlin_api_access.log combined

    <Directory %SENLIN_BIN_DIR%>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
    </Directory>
</VirtualHost>

Alias /cluster %SENLIN_BIN_DIR%/senlin-wsgi-api
<Location /cluster>
    SetHandler wsgi-script
    Options +ExecCGI
    WSGIProcessGroup senlin-api
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    AllowEncodedSlashes On
</Location>
