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
This commit is contained in:
Clint Adams 2015-10-06 15:57:14 -04:00
parent 2a142ac027
commit a827227079
2 changed files with 4 additions and 0 deletions

View File

@ -28,6 +28,7 @@ define httpd::vhost::proxy (
$ssl = false,
$vhost_name = '*',
$proxyexclusions = undef,
$docroot = undef,
) {
include ::httpd

View File

@ -26,6 +26,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
ProxyPassReverse / <%= @dest %>/
ProxyPreserveHost On
<% if @proxyexclusions != nil and @docroot != nil %>
DocumentRoot <%= @docroot %>
<% end %>
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
LogLevel warn
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined