Allow specification of locations to not be proxied
A user of httpd::vhost::proxy may wish to exclude certain URLs from being proxied. This change allows the template to be populated with such exclusions. Change-Id: I55a86d3c703a667daf55cb75cf559eb23a556219
This commit is contained in:
parent
d3261cdc81
commit
c39fde20ed
|
@ -26,7 +26,8 @@ define httpd::vhost::proxy (
|
||||||
$servername = undef,
|
$servername = undef,
|
||||||
$serveraliases = undef,
|
$serveraliases = undef,
|
||||||
$ssl = false,
|
$ssl = false,
|
||||||
$vhost_name = '*'
|
$vhost_name = '*',
|
||||||
|
$proxyexclusions = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ::httpd
|
include ::httpd
|
||||||
|
|
|
@ -16,6 +16,12 @@ NameVirtualHost <%= @vhost_name %>:<%= @port %>
|
||||||
Order deny,allow
|
Order deny,allow
|
||||||
Allow from all
|
Allow from all
|
||||||
</Proxy>
|
</Proxy>
|
||||||
|
|
||||||
|
<% if @proxyexclusions.is_a? Array %>
|
||||||
|
<% @proxyexclusions.each do |name| %><%= " ProxyPass #{name} !\n" %><% end %>
|
||||||
|
<% elsif @proxyexclusions != nil %>
|
||||||
|
<%= " ProxyPass #{@proxyexclusions} !" %>
|
||||||
|
<% end %>
|
||||||
ProxyPass / <%= @dest %>/
|
ProxyPass / <%= @dest %>/
|
||||||
ProxyPassReverse / <%= @dest %>/
|
ProxyPassReverse / <%= @dest %>/
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
Loading…
Reference in New Issue