kolla-ansible/ansible/roles/vitrage/templates/wsgi-vitrage.conf.j2
Kien Nguyen 043943117d Use <project>_install_type instead of kolla_install_type
Use <project>_install_type instead of kolla_install_type
to set python_path. For example, general kolla_install_type
is 'binary', but user wants to deploy Horizon from 'source'.
Horizon templates still use python_path=/usr/share/openstack-dashboard,
it is wrong.

Change-Id: Ide6a24e17b1f8ab6506aa5e53f70693706830418
2019-01-04 14:33:46 +07:00

33 lines
1.2 KiB
Django/Jinja

{% set python_path = '/usr/lib/python2.7/site-packages' if vitrage_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ vitrage_api_port }}
ServerSignature Off
ServerTokens Prod
TraceEnable off
<VirtualHost *:{{ vitrage_api_port }}>
## Vhost docroot
DocumentRoot "/var/www/cgi-bin/vitrage"
## Directories, there should at least be a declaration for /var/www/cgi-bin/vitrage
<Directory "/var/www/cgi-bin/vitrage">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
## Logging
ErrorLog "/var/log/kolla/vitrage/vitrage_wsgi_error.log"
ServerSignature Off
CustomLog "/var/log/kolla/vitrage/vitrage_wsgi_access.log" combined
WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess vitrage group=vitrage processes={{ openstack_service_workers }} threads=1 user=vitrage python-path={{ python_path }}
WSGIProcessGroup vitrage
WSGIScriptAlias / "/var/www/cgi-bin/vitrage/app.wsgi"
{% if enable_vitrage_prometheus_datasource | bool %}
WSGIPassAuthorization On
{% endif %}
</VirtualHost>