Browse Source

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
changes/62/547062/1
Jeremy Stanley 1 year ago
parent
commit
eec99fedb9
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      templates/vhost-proxy.conf.erb

+ 7
- 0
templates/vhost-proxy.conf.erb View File

@@ -33,6 +33,13 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
33 33
 
34 34
 <% if @proxyexclusions != nil and @docroot != nil %>
35 35
    DocumentRoot <%= @docroot %>
36
+   <Directory <%= @docroot %>>
37
+     Order deny,allow
38
+     Allow from all
39
+    <IfVersion >= 2.4>
40
+      Require all granted
41
+    </IfVersion>
42
+   </Directory>
36 43
 <% end %>
37 44
    ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
38 45
    LogLevel warn

Loading…
Cancel
Save