puppet-storyboard/templates/storyboard_http.vhost.erb
Jeremy Stanley 762bed13d4 Wildcard the VirtualHost directive addresses
On systems where the site FQDN is mapped to the loopback interface
in /etc/hosts, Apache doesn't apply the vhost configuration on
incoming connections to other addresses/interfaces. Apache
recommends wildcarding VirtualHost directives these days, and it's
something we already hard-code in other modules (e.g. puppet-zuul).

This _could_ conceivably cause complication for anyone trying to
coinstall this module on a server hosting other sites without
name-based hosting configured correctly, but that should be an
increasingly unusual configuration.

Change-Id: I11f5b586c4f7b42017c2eb78af4be87211343381
2016-05-18 20:43:20 +00:00

26 lines
993 B
Plaintext

<VirtualHost *:80>
<% if scope.lookupvar("storyboard::application::server_admin") != :undef %>
ServerAdmin <%= scope.lookupvar("storyboard::application::server_admin") %>
<% end %>
ServerName <%= scope.lookupvar("storyboard::application::hostname") %>
DocumentRoot <%= scope.lookupvar("storyboard::application::www_root") %>
WSGIDaemonProcess storyboard user=<%= scope.lookupvar("storyboard::params::user") %> group=<%= scope.lookupvar("storyboard::params::group") %> threads=5 python-path=/usr/local/lib/python2.7/dist-packages
WSGIScriptAlias /api /var/lib/storyboard/storyboard.wsgi
WSGIPassAuthorization On
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/storyboard-error.log
CustomLog ${APACHE_LOG_DIR}/storyboard-access.log combined
<Directory "<%= scope.lookupvar("storyboard::application::install_root") %>">
<% if @new_vhost_perms %>
Require all granted
<% else %>
Order allow,deny
Allow from all
<% end %>
</Directory>
</VirtualHost>