diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index 457d40b..aa0b556 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -88,6 +88,7 @@ # password with HTTP Basic Authentication. # [*auth_basic_user_file*] - This directive sets the htpasswd filename for # the authentication realm. +# [*client_max_body_size*] - This directive sets client_max_body_size. # [*vhost_cfg_append*] - It expects a hash with custom directives to # put after everything else inside vhost # [*vhost_cfg_prepend*] - It expects a hash with custom directives to @@ -165,6 +166,7 @@ define nginx::resource::vhost ( $try_files = undef, $auth_basic = undef, $auth_basic_user_file = undef, + $client_max_body_size = undef, $vhost_cfg_prepend = undef, $vhost_cfg_append = undef, $include_files = undef, diff --git a/templates/vhost/vhost_header.erb b/templates/vhost/vhost_header.erb index 3bc488b..5973bf3 100644 --- a/templates/vhost/vhost_header.erb +++ b/templates/vhost/vhost_header.erb @@ -11,6 +11,9 @@ server { <% if defined? @auth_basic_user_file -%> auth_basic_user_file <%= @auth_basic_user_file %>; <% end -%> +<% if defined? @client_max_body_size -%> + client_max_body_size <%= @client_max_body_size %>; +<% end -%> <%# make sure that allow comes before deny by forcing the allow key (if it -%> <%# exists) to be first in the output order. The hash keys also need to be -%> <%# sorted so that the ordering is stable. -%>