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:
parent
2a142ac027
commit
a827227079
@ -28,6 +28,7 @@ define httpd::vhost::proxy (
|
|||||||
$ssl = false,
|
$ssl = false,
|
||||||
$vhost_name = '*',
|
$vhost_name = '*',
|
||||||
$proxyexclusions = undef,
|
$proxyexclusions = undef,
|
||||||
|
$docroot = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::httpd
|
include ::httpd
|
||||||
|
@ -26,6 +26,9 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
|||||||
ProxyPassReverse / <%= @dest %>/
|
ProxyPassReverse / <%= @dest %>/
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
||||||
|
<% if @proxyexclusions != nil and @docroot != nil %>
|
||||||
|
DocumentRoot <%= @docroot %>
|
||||||
|
<% end %>
|
||||||
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
ErrorLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_error.log
|
||||||
LogLevel warn
|
LogLevel warn
|
||||||
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
|
CustomLog /var/log/<%= scope.lookupvar("httpd::params::apache_name") %>/<%= @name %>_access.log combined
|
||||||
|
Loading…
Reference in New Issue
Block a user