aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/heat/templates/wsgi-heat-api-cfn.conf.j2
blob: 1b339959fa5697071d654313a54a0dc188bcb009 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{% set heat_log_dir = '/var/log/kolla/heat' %}
{% set binary_path = '/var/lib/kolla/venv/bin' %}
{% if heat_enable_tls_backend | bool %}
{%     if kolla_base_distro in ['centos', 'rocky']  %}
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_cfn_listen_port }}

ServerSignature Off
ServerTokens Prod
TraceEnable off
TimeOut {{ kolla_httpd_timeout }}
KeepAliveTimeout {{ kolla_httpd_keep_alive }}

<Directory "{{ binary_path }}">
    <FilesMatch "heat-wsgi-api-cfn">
        AllowOverride None
        Options None
        Require all granted
    </FilesMatch>
</Directory>

ErrorLog "{{ heat_log_dir }}/apache-cfn-error.log"
<IfModule log_config_module>
CustomLog "{{ heat_log_dir }}/apache-cfn-access.log" common
</IfModule>

<VirtualHost *:{{ heat_api_cfn_listen_port }}>
    WSGIDaemonProcess heat-api-cfn processes={{ heat_api_cfn_workers }} threads=1 user=heat group=heat display-name=heat-api-cfn
    WSGIProcessGroup heat-api-cfn
    WSGIScriptAlias / {{ binary_path }}/heat-wsgi-api-cfn
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    ErrorLogFormat "%{cu}t %M"
    ErrorLog "{{ heat_log_dir }}/heat-api-cfn-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-cfn-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>