Skip to content
Snippets Groups Projects
wsgi-aodh.conf.j2 1.75 KiB
Newer Older
Michal Nasiadka's avatar
Michal Nasiadka committed
{% set aodh_log_dir = '/var/log/kolla/aodh' %}
{% if aodh_install_type == 'binary' %}
    {% set python_path = '/usr/lib/python3/dist-packages' if kolla_base_distro in ['debian', 'ubuntu'] else '/usr/lib/python' ~ distro_python_version ~ '/site-packages' %}
{% else %}
    {% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}
{% endif %}
{% set binary_path = '/usr/bin' if aodh_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
Listen {{ api_interface_address | put_address_in_context('url') }}:{{ aodh_api_listen_port }}
zhubingbing's avatar
zhubingbing committed

ServerSignature Off
ServerTokens Prod
KeepAliveTimeout {{ kolla_httpd_keep_alive }}
Michal Nasiadka's avatar
Michal Nasiadka committed
ErrorLog "{{ aodh_log_dir }}/apache-error.log"
<IfModule log_config_module>
    CustomLog "{{ aodh_log_dir }}/apache-access.log" common
</IfModule>

{% if aodh_logging_debug | bool %}
LogLevel info
{% endif %}

<Directory "{{ binary_path }}">
    <FilesMatch "^aodh-api$">
      Options Indexes FollowSymLinks MultiViews
      AllowOverride None
      Require all granted
    </FilesMatch>
</Directory>
zhubingbing's avatar
zhubingbing committed

<VirtualHost *:{{ aodh_api_listen_port }}>
zhubingbing's avatar
zhubingbing committed
  ## Logging
Michal Nasiadka's avatar
Michal Nasiadka committed
  ErrorLog "{{ aodh_log_dir }}/aodh_wsgi_error.log"
zhubingbing's avatar
zhubingbing committed
  ServerSignature Off
  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat
Michal Nasiadka's avatar
Michal Nasiadka committed
  CustomLog "{{ aodh_log_dir }}/aodh_wsgi_access.log" logformat
zhubingbing's avatar
zhubingbing committed
  WSGIApplicationGroup %{GLOBAL}
  WSGIDaemonProcess aodh group=aodh processes={{ openstack_service_workers }} threads=1 user=aodh python-path={{ python_path }}
zhubingbing's avatar
zhubingbing committed
  WSGIProcessGroup aodh
{% if aodh_install_type == 'binary' and kolla_base_distro in ['debian', 'ubuntu'] %}
  WSGIScriptAlias / "{{ binary_path }}/python3-aodh-api"
{% else %}
  WSGIScriptAlias / "{{ binary_path }}/aodh-api"
{% endif %}
zhubingbing's avatar
zhubingbing committed
</VirtualHost>