Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-9668 ) Please make ProxyRequests setting in vhost.pp configurable #1935

Merged
merged 12 commits into from
Aug 20, 2019
Merged
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,7 @@ This release features many improvements and bugfixes, including several new defi
- passenger_ruby
- passenger_start_timeout
- proxy_preserve_host
- proxy_requests
- redirectmatch_dest
- ssl_crl_check
- wsgi_chunked_request
Expand Down
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ This release features many improvements and bugfixes, including several new defi
- passenger_ruby
- passenger_start_timeout
- proxy_preserve_host
- proxy_requests
- redirectmatch_dest
- ssl_crl_check
- wsgi_chunked_request
Expand Down
12 changes: 11 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4657,7 +4657,7 @@ The following parameters are available in the `apache::mod::proxy` class.

##### `proxy_requests`

Data type: `Any`
Data type: `Boolean`
aukesj marked this conversation as resolved.
Show resolved Hide resolved

Enables forward (standard) proxy requests.

Expand Down Expand Up @@ -7369,6 +7369,16 @@ X-Forwarded-Host and X-Forwarded-Server) get sent to the backend server.

Default value: `undef`

##### `proxy_requests`

Data type: `Any`
aukesj marked this conversation as resolved.
Show resolved Hide resolved

Sets the [ProxyErrorOverride Directive](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyrequests).
aukesj marked this conversation as resolved.
Show resolved Hide resolved
This prarmeter allows or prevents Apache httpd from functioning as a forward proxy server.
(Setting ProxyRequests to Off does not disable use of the ProxyPass directive.)

Default value: `false`

##### `proxy_error_override`

Data type: `Any`
Expand Down
1 change: 1 addition & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -1705,6 +1705,7 @@
$proxy_dest_reverse_match = undef,
$proxy_pass = undef,
$proxy_pass_match = undef,
Boolean $proxy_requests = false,
$suphp_addhandler = $::apache::params::suphp_addhandler,
Enum['on', 'off'] $suphp_engine = $::apache::params::suphp_engine,
$suphp_configpath = $::apache::params::suphp_configpath,
Expand Down
1 change: 1 addition & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@
'setenv' => ['proxy-nokeepalive 1', 'force-proxy-request-1.0 1'],
},
],
'proxy_requests' => false,
'suphp_addhandler' => 'foo',
'suphp_engine' => 'on',
'suphp_configpath' => '/var/www/html',
Expand Down
4 changes: 4 additions & 0 deletions templates/vhost/_proxy.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<% if @proxy_dest or @proxy_pass or @proxy_pass_match or @proxy_dest_match -%>

## Proxy rules
<% if @proxy_requests -%>
ProxyRequests On
<% else -%>
ProxyRequests Off
<%- end -%>
<%- end -%>
<% if @proxy_preserve_host -%>
ProxyPreserveHost On
<% else -%>
Expand Down