diff --git a/manifests/vhost.pp b/manifests/vhost.pp index f2e736cbf..579748233 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -144,6 +144,7 @@ $php_admin_flags = [], $php_admin_values = [], $no_proxy_uris = [], + $proxy_preserve_host = false, $redirect_source = '/', $redirect_dest = undef, $redirect_status = undef, diff --git a/templates/vhost/_proxy.erb b/templates/vhost/_proxy.erb index 7e0221f95..2c5e24ede 100644 --- a/templates/vhost/_proxy.erb +++ b/templates/vhost/_proxy.erb @@ -3,6 +3,9 @@ ## Proxy rules ProxyRequests Off <%- end -%> +<% if @proxy_preserve_host %> + ProxyPreserveHost On +<% end %> <% [@proxy_pass].flatten.compact.each do |proxy| %> ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> >