Skip to content

Commit

Permalink
Support parameters along with proxy_pass
Browse files Browse the repository at this point in the history
  • Loading branch information
mark0n authored and Morgan Haskel committed Nov 7, 2014
1 parent 6cbc3d0 commit f27d4f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ Specifies the destination address of a [ProxyPass](http://httpd.apache.org/docs/

#####`proxy_pass`

Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'.
Specifies an array of `path => URI` for a [ProxyPass](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass) configuration. Defaults to 'undef'. Optionally parameters can be added as an array.

```puppet
apache::vhost { 'site.name.fdqn':
Expand All @@ -1139,6 +1139,8 @@ apache::vhost { 'site.name.fdqn':
{ 'path' => '/c', 'url' => 'http://backend-a/c', 'params' => 'max=20 ttl=120 retry=300' },
{ 'path' => '/l', 'url' => 'http://backend-xy',
'reverse_urls' => ['http://backend-x', 'http://backend-y'] },
{ 'path' => '/d', 'url' => 'http://backend-a/d',
'params' => ['retry=0', 'timeout=5'] },
],
}
```
Expand Down
1 change: 0 additions & 1 deletion templates/vhost/_proxy.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<%- end -%>
<%- [@proxy_pass].flatten.compact.each do |proxy| -%>
ProxyPass <%= proxy['path'] %> <%= proxy['url'] %> <%- if !proxy['params'].nil? -%> <%= proxy['params'] %> <%- end -%>

<Location <%= proxy['path']%>>
<%- if proxy['reverse_urls'].nil? -%>
ProxyPassReverse <%= proxy['url'] %>
Expand Down

0 comments on commit f27d4f8

Please sign in to comment.