puppet-openstack_health/templates/openstack-health-api.vhost.erb

43 lines
1.4 KiB
Plaintext

<% unless [443, 80].include?(scope.lookupvar("openstack_health::api::vhost_port").to_i) %>
Listen <%= scope.lookupvar("openstack_health::api::vhost_port") %>
<% end %>
<VirtualHost *:<%= scope.lookupvar("openstack_health::api::vhost_port") %>>
ServerName <%= scope.lookupvar("openstack_health::api::vhost_name") %>
ServerAdmin <%= scope.lookupvar("openstack_health::api::server_admin") %>
LogLevel info
CustomLog ${APACHE_LOG_DIR}/openstack-health-api-access.log combined
ErrorLog ${APACHE_LOG_DIR}/openstack-health-api-error.log
WSGIDaemonProcess flask user=openstack_health group=openstack_health threads=5 home=<%= scope.lookupvar("openstack_health::api::source_dir") %>
WSGIScriptAlias / /usr/local/bin/openstack-health
<Directory /usr/local/bin>
WSGIProcessGroup flask
WSGIApplicationGroup %{GLOBAL}
WSGIScriptReloading On
Order allow,deny
Allow from all
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>
<IfModule mod_cache.c>
<% if @operatingsystem == "Ubuntu" and @operatingsystemrelease == "12.04" %>
<IfModule mod_disk_cache.c>
<% else %>
<IfModule mod_cache_disk.c>
<% end %>
CacheRoot "/var/cache/apache2/mod_disk_cache"
CacheEnable disk "/"
CacheDirLevels 5
CacheDirLength 3
CacheLock on
</IfModule>
</IfModule>
DocumentRoot <%= scope.lookupvar("openstack_health::api::api_dir") %>
</VirtualHost>