d5ed2980db
This patch introduces an override for the number of Apache processes and threads for Horizon: - horizon_wsgi_processes - horizon_wsgi_threads The values may be set in /etc/openstack_deploy/user_variables.yml and if they are unset, half the number of available vCPU's will be used instead. Implements: blueprint gate-split Change-Id: Ie608ef66b8979a466e72c6085c9afa6ab95cc6ff
56 lines
1.7 KiB
Django/Jinja
56 lines
1.7 KiB
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
{% set _wsgi_threads = ansible_processor_vcpus | default(2) // 2 %}
|
|
{% set wsgi_threads = _wsgi_threads if _wsgi_threads > 0 else 1 %}
|
|
|
|
<VirtualHost *:80>
|
|
ServerName {{ horizon_server_name }}
|
|
RewriteEngine On
|
|
RewriteCond %{HTTPS} !=on
|
|
RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R,L]
|
|
</VirtualHost>
|
|
|
|
<VirtualHost *:443>
|
|
ServerName {{ horizon_server_name }}
|
|
|
|
LogLevel {{ horizon_log_level }}
|
|
ErrorLog /var/log/horizon/horizon-error.log
|
|
CustomLog /var/log/horizon/ssl_access.log combined
|
|
Options +FollowSymLinks
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile {{ horizon_ssl_cert }}
|
|
SSLCertificateKeyFile {{ horizon_ssl_key }}
|
|
{% if horizon_user_ssl_ca_cert is defined -%}
|
|
SSLCACertificateFile {{ horizon_ssl_ca_cert }}
|
|
{% endif -%}
|
|
SSLCompression Off
|
|
SSLProtocol All -SSLv2 -SSLv3
|
|
SSLHonorCipherOrder On
|
|
SSLCipherSuite {{ horizon_ssl_cipher_suite }}
|
|
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
|
|
|
|
WSGIScriptAlias / {{ horizon_lib_wsgi_file }}
|
|
WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(wsgi_threads) }} threads={{ horizon_wsgi_threads | default(wsgi_threads) }}
|
|
WSGIProcessGroup horizon
|
|
WSGIApplicationGroup horizon
|
|
|
|
<Directory {{ horizon_lib_wsgi_file | dirname }}>
|
|
<Files django.wsgi>
|
|
Order allow,deny
|
|
allow from all
|
|
Require all granted
|
|
</Files>
|
|
</Directory>
|
|
|
|
Alias /static {{ horizon_lib_dir }}/static/
|
|
|
|
<Directory {{ horizon_lib_dir }}/static/>
|
|
Options -FollowSymlinks
|
|
AllowOverride None
|
|
Order allow,deny
|
|
allow from all
|
|
Require all granted
|
|
</Directory>
|
|
</VirtualHost>
|