kolla-ansible/ansible/roles/heat/templates/wsgi-heat-api.conf.j2
generalfuzz 67a31fd219 Fix Heat WSGI Logging
Fix Heat WSGI logging directives and correct access log name.

Change-Id: Iac09e481ae46934fc26300eba8c5d81ccd0504e8
Partially-Implements: blueprint add-ssl-internal-network
2020-05-14 21:32:42 +00:00

52 lines
1.9 KiB
Django/Jinja

{% set heat_log_dir = '/var/log/kolla/heat' %}
{% if heat_install_type == 'binary' %}
{% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python2.7/site-packages' %}
{% else %}
{% set python_path = '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
{% endif %}
{% set binary_path = '/usr/bin' if heat_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if heat_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
{% endif %}
{% endif %}
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ heat_api_listen_port }}
ServerSignature Off
ServerTokens Prod
TraceEnable off
<Directory "{{ binary_path }}">
<FilesMatch "heat-wsgi-api">
AllowOverride None
Options None
Require all granted
</FilesMatch>
</Directory>
ErrorLog "{{ heat_log_dir }}/apache-error.log"
<IfModule log_config_module>
CustomLog "{{ heat_log_dir }}/apache-access.log" common
</IfModule>
<VirtualHost *:{{ heat_api_listen_port }}>
WSGIDaemonProcess heat-api processes={{ openstack_service_workers }} threads=1 user=heat group=heat display-name=%{GROUP} python-path={{ python_path }}
WSGIProcessGroup heat-api
WSGIScriptAlias / {{ binary_path }}/heat-wsgi-api
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
<IfVersion >= 2.4>
ErrorLogFormat "%{cu}t %M"
</IfVersion>
ErrorLog "{{ heat_log_dir }}/heat-api-error.log"
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
CustomLog "{{ heat_log_dir }}/heat-api-access.log" logformat
{% if heat_enable_tls_backend | bool %}
SSLEngine On
SSLCertificateFile /etc/heat/certs/heat-cert.pem
SSLCertificateKeyFile /etc/heat/certs/heat-key.pem
{% endif %}
</VirtualHost>