Skip to content

Commit

Permalink
Merge pull request #139 from OmarzT/master
Browse files Browse the repository at this point in the history
make proxy_buffers, proxy_buffer_size, client_max_body_size configurable
  • Loading branch information
James Fryman committed Sep 6, 2013
2 parents 2df378e + b384727 commit 96c9305
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
$proxy_http_version = $nginx::params::nx_proxy_http_version,
$types_hash_max_size = $nginx::params::nx_types_hash_max_size,
$types_hash_bucket_size = $nginx::params::nx_types_hash_bucket_size,
$http_cfg_append = $nginx::params::nx_http_cfg_append
$client_max_body_size = $nginx::params::nx_client_max_body_size,
$proxy_buffers = $nginx::params::nx_proxy_buffers,
$http_cfg_append = $nginx::params::nx_http_cfg_append,
$proxy_buffer_size = $nginx::params::nx_proxy_buffer_size,
) inherits nginx::params {
File {
owner => 'root',
Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
$service_restart = $nginx::params::nx_service_restart,
$mail = $nginx::params::nx_mail,
$server_tokens = $nginx::params::nx_server_tokens,
$client_max_body_size = $nginx::params::nx_client_max_body_size,
$proxy_buffers = $nginx::params::nx_proxy_buffers,
$proxy_buffer_size = $nginx::params::nx_proxy_buffer_size,
$http_cfg_append = $nginx::params::nx_http_cfg_append,
$nginx_vhosts = {},
$nginx_upstreams = {},
Expand All @@ -68,6 +71,9 @@
proxy_cache_inactive => $proxy_cache_inactive,
confd_purge => $confd_purge,
server_tokens => $server_tokens,
client_max_body_size => $client_max_body_size,
proxy_buffers => $proxy_buffers,
proxy_buffer_size => $proxy_buffer_size,
http_cfg_append => $http_cfg_append,
require => Class['nginx::package'],
notify => Class['nginx::service'],
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
$nx_proxy_read_timeout = '90'
$nx_proxy_buffers = '32 4k'
$nx_proxy_http_version = '1.0'
$nx_proxy_buffer_size = '8k'

$nx_logdir = $::kernel ? {
/(?i-mx:linux)/ => '/var/log/nginx',
Expand Down
5 changes: 3 additions & 2 deletions templates/conf.d/proxy.conf.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
proxy_redirect <%= scope.lookupvar('nginx::params::nx_proxy_redirect') %>;
client_max_body_size <%= scope.lookupvar('nginx::params::nx_client_max_body_size') %>;
client_max_body_size <%= @client_max_body_size %>;
client_body_buffer_size <%= scope.lookupvar('nginx::params::nx_client_body_buffer_size') %>;
proxy_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_timeout') %>;
proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeout') %>;
proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>;
proxy_buffers <%= scope.lookupvar('nginx::params::nx_proxy_buffers') %>;
proxy_buffers <%= @proxy_buffers %>;
proxy_buffer_size <%= @proxy_buffer_size %>;
proxy_http_version <%= @proxy_http_version %>;
<% @proxy_set_header.each do |header| %>
proxy_set_header <%= header %>;<% end %>

0 comments on commit 96c9305

Please sign in to comment.