diff --git a/README.md b/README.md index 4f0112eda2..f661788770 100644 --- a/README.md +++ b/README.md @@ -2100,6 +2100,10 @@ Specifies if the virtual host is present or absent. Valid options: 'absent', 'pr Sets the [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource) directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid options must either begin with a '/' or be 'disabled'. Default: undef. +#####`fastcgi_idle_timeout` + +If using fastcgi, this option sets the timeout for the server to respond. + ##### `filters` [Filters](https://httpd.apache.org/docs/current/mod/mod_filter.html) enable smart, context-sensitive configuration of output content filters. diff --git a/manifests/vhost.pp b/manifests/vhost.pp index fc3f9c05fa..1d563b80ef 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -116,6 +116,7 @@ $fastcgi_server = undef, $fastcgi_socket = undef, $fastcgi_dir = undef, + $fastcgi_idle_timeout = undef, $additional_includes = [], $use_optional_includes = $::apache::use_optional_includes, $apache_version = $::apache::apache_version, @@ -945,6 +946,7 @@ # - $fastcgi_server # - $fastcgi_socket # - $fastcgi_dir + # - $fastcgi_idle_timeout # - $apache_version if $fastcgi_server or $fastcgi_dir { concat::fragment { "${name}-fastcgi": diff --git a/spec/defines/vhost_spec.rb b/spec/defines/vhost_spec.rb index bdf2953367..f2bb135d1f 100644 --- a/spec/defines/vhost_spec.rb +++ b/spec/defines/vhost_spec.rb @@ -334,6 +334,7 @@ 'fastcgi_server' => 'localhost', 'fastcgi_socket' => '/tmp/fastcgi.socket', 'fastcgi_dir' => '/tmp', + 'fastcgi_idle_timeout' => '120', 'additional_includes' => '/custom/path/includes', 'apache_version' => '2.4', 'use_optional_includes' => true, diff --git a/templates/vhost/_fastcgi.erb b/templates/vhost/_fastcgi.erb index 3a2baa5596..b4718391b7 100644 --- a/templates/vhost/_fastcgi.erb +++ b/templates/vhost/_fastcgi.erb @@ -1,6 +1,7 @@ <% if @fastcgi_server -%> - FastCgiExternalServer <%= @fastcgi_server %> -socket <%= @fastcgi_socket %> + FastCgiExternalServer <%= @fastcgi_server %> -socket <%= @fastcgi_socket -%> +<% unless @fastcgi_idle_timeout.nil? %> -idle-timeout <%= @fastcgi_idle_timeout %><% end %> <% end -%> <% if @fastcgi_dir -%>