# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

# This is an example Apache2 configuration file for using the
# solum API through mod_wsgi.

Listen 9777

<VirtualHost *:9777>
    WSGIDaemonProcess solum-api processes=2 threads=10 user=SOMEUSER display-name=%{GROUP}
    WSGIProcessGroup solum-api
    WSGIScriptAlias / /usr/local/bin/solum-wsgi-api
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    AllowEncodedSlashes On
    <IfVersion >= 2.4>
      ErrorLogFormat "%{cu}t %M"
    </IfVersion>
    ErrorLog /var/log/apache2/solum_api.log
    CustomLog /var/log/apache2/solum_api_access.log combined

    <Directory /usr/local/bin>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
    </Directory>
</VirtualHost>
