kolla-ansible/ansible/roles/keystone/templates/wsgi-keystone.conf.j2
Mark Goddard a103ed7c07 Use service-specific _install_type variables in wsgi scripts
Change-Id: I0c31ad353e1fb764bc8e826cda5c3d092623f44b
2019-03-15 15:22:54 +00:00

59 lines
2.6 KiB
Django/Jinja

{% set keystone_log_dir = '/var/log/kolla/keystone' %}
{% if keystone_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro == 'ubuntu' else '/usr/lib/python2.7/site-packages' %}
{% else %}
{% set python_path = '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
{% endif %}
{% set binary_path = '/usr/bin' if keystone_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
Listen {{ api_interface_address }}:{{ keystone_public_listen_port }}
Listen {{ api_interface_address }}:{{ keystone_admin_listen_port }}
ServerSignature Off
ServerTokens Prod
TraceEnable off
<Directory "{{ binary_path }}">
<FilesMatch "^keystone-wsgi-(public|admin)$">
AllowOverride None
Options None
Require all granted
</FilesMatch>
</Directory>
<VirtualHost *:{{ keystone_public_listen_port }}>
WSGIDaemonProcess keystone-public processes={{ openstack_service_workers }} threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup keystone-public
{% if keystone_install_type == 'binary' and kolla_base_distro == 'ubuntu' %}
WSGIScriptAlias / {{ binary_path }}/python3-keystone-wsgi-public
{% else %}
WSGIScriptAlias / {{ binary_path }}/keystone-wsgi-public
{% endif %}
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog "{{ keystone_log_dir }}/keystone-apache-public-error.log"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "{{ keystone_log_dir }}/keystone-apache-public-access.log" logformat
</VirtualHost>
<VirtualHost *:{{ keystone_admin_listen_port }}>
WSGIDaemonProcess keystone-admin processes={{ openstack_service_workers }} threads=1 user=keystone group=keystone display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup keystone-admin
{% if keystone_install_type == 'binary' and kolla_base_distro == 'ubuntu' %}
WSGIScriptAlias / {{ binary_path }}/python3-keystone-wsgi-admin
{% else %}
WSGIScriptAlias / {{ binary_path }}/keystone-wsgi-admin
{% endif %}
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog "{{ keystone_log_dir }}/keystone-apache-admin-error.log"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "{{ keystone_log_dir }}/keystone-apache-admin-access.log" logformat
</VirtualHost>