From 71958f2b922cdfaff8f3f2d9fae05386475d7a3f Mon Sep 17 00:00:00 2001 From: Micha Krause Date: Wed, 23 Mar 2016 11:03:01 +0100 Subject: [PATCH] Added vhost option fastcgi_idle_timeout --- README.md | 4 ++++ manifests/vhost.pp | 2 ++ spec/defines/vhost_spec.rb | 1 + templates/vhost/_fastcgi.erb | 3 ++- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b7f3da501..551287462f 100644 --- a/README.md +++ b/README.md @@ -2098,6 +2098,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 90e99d1101..abe60a18eb 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -114,6 +114,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, @@ -933,6 +934,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 405c2a21e8..6ecee9a4cf 100644 --- a/spec/defines/vhost_spec.rb +++ b/spec/defines/vhost_spec.rb @@ -327,6 +327,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 -%>