summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@gcfm.net>2015-10-06 15:57:14 -0400
committerClint Adams <clint@gcfm.net>2015-10-06 15:57:14 -0400
commita827227079d380def59e6c93255eeb0cf77ffd12 (patch)
tree2618a88750c7cc00f5003cfa8a944682c34c73e6
parent2a142ac0272066ed7216372aaf744fe6d585e64f (diff)
Allow specification of DocumentRoot when reverse-proxying partially
If any locations are being excluded from reverse-proxying, we need to be able to specify a DocumentRoot to serve up un-proxied files. Change-Id: I1c5fe6f73b5983886578975e89c5e4148b506795
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Workflow+1: Jeremy Stanley <fungi@yuggoth.org> Code-Review+1: Anita Kuno <anteaya@anteaya.info> Code-Review+2: Elizabeth K. Joseph <lyz@princessleia.com> Submitted-by: Jenkins Submitted-at: Wed, 07 Oct 2015 20:52:41 +0000 Reviewed-on: https://review.openstack.org/231682 Project: openstack-infra/puppet-httpd Branch: refs/heads/master
-rw-r--r--manifests/vhost/proxy.pp1
-rw-r--r--templates/vhost-proxy.conf.erb3
2 files changed, 4 insertions, 0 deletions
diff --git a/manifests/vhost/proxy.pp b/manifests/vhost/proxy.pp
index 86d5622..d0b699c 100644
--- a/manifests/vhost/proxy.pp
+++ b/manifests/vhost/proxy.pp
@@ -28,6 +28,7 @@ define httpd::vhost::proxy (
28 $ssl = false, 28 $ssl = false,
29 $vhost_name = '*', 29 $vhost_name = '*',
30 $proxyexclusions = undef, 30 $proxyexclusions = undef,
31 $docroot = undef,
31 ) { 32 ) {
32 33
33 include ::httpd 34 include ::httpd
diff --git a/templates/vhost-proxy.conf.erb b/templates/vhost-proxy.conf.erb
index f275775..b81f7dd 100644
--- a/templates/vhost-proxy.conf.erb
+++ b/templates/vhost-proxy.conf.erb
@@ -26,6 +26,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
26 ProxyPassReverse / <%= @dest %>/ 26 ProxyPassReverse / <%= @dest %>/
27 ProxyPreserveHost On 27 ProxyPreserveHost On
28 28
29<% if @proxyexclusions != nil and @docroot != nil %>
30 DocumentRoot <%= @docroot %>
31<% end %>
29 ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log 32 ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
30 LogLevel warn 33 LogLevel warn
31 CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined 34 CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined