From eec99fedb987fde337293828856494ef834cf4cc Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 22 Feb 2018 16:28:32 +0000 Subject: [PATCH] Allow access to docroot for proxy exclusions In a httpd::vhost::proxy resource, if proxy exclusions and a docroot are specified, we should allow clients to access contents of the docroot. Change-Id: If30b192b8f2c16375aa534131217a5aa2a9ff47d --- templates/vhost-proxy.conf.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/vhost-proxy.conf.erb b/templates/vhost-proxy.conf.erb index 5e5818c..24d0a73 100644 --- a/templates/vhost-proxy.conf.erb +++ b/templates/vhost-proxy.conf.erb @@ -33,6 +33,13 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %> <% if @proxyexclusions != nil and @docroot != nil %> DocumentRoot <%= @docroot %> + > + Order deny,allow + Allow from all + = 2.4> + Require all granted + + <% end %> ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log LogLevel warn