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:
		@@ -28,6 +28,7 @@ define httpd::vhost::proxy (
 | 
			
		||||
    $ssl           = false,
 | 
			
		||||
    $vhost_name    = '*',
 | 
			
		||||
    $proxyexclusions = undef,
 | 
			
		||||
    $docroot       = undef,
 | 
			
		||||
  ) {
 | 
			
		||||
 | 
			
		||||
  include ::httpd
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user