add support for fastcgi_cache_path
This commit is contained in:
parent
4d816c990a
commit
024cc33d62
4 changed files with 12 additions and 0 deletions
|
@ -41,6 +41,7 @@ class nginx::config(
|
|||
$conf_template = $nginx::params::nx_conf_template,
|
||||
$proxy_conf_template = $nginx::params::nx_proxy_conf_template,
|
||||
$proxy_redirect = $nginx::params::nx_proxy_redirect,
|
||||
$fastcgi_cache_path = $nginx::params::nx_fastcgi_cache_path,
|
||||
) inherits nginx::params {
|
||||
|
||||
File {
|
||||
|
|
|
@ -66,6 +66,7 @@ class nginx (
|
|||
$nginx_locations = {},
|
||||
$nginx_mailhosts = {},
|
||||
$manage_repo = $nginx::params::manage_repo,
|
||||
$fastcgi_cache_path = $nginx::params::nx_fastcgi_cache_path,
|
||||
) inherits nginx::params {
|
||||
|
||||
include stdlib
|
||||
|
@ -118,6 +119,9 @@ class nginx (
|
|||
validate_hash($nginx_locations)
|
||||
validate_hash($nginx_mailhosts)
|
||||
validate_bool($manage_repo)
|
||||
if ($fastcgi_cache_path != false) {
|
||||
validate_string($fastcgi_cache_path)
|
||||
}
|
||||
|
||||
class { 'nginx::package':
|
||||
package_name => $package_name,
|
||||
|
@ -155,6 +159,7 @@ class nginx (
|
|||
proxy_redirect => $proxy_redirect,
|
||||
require => Class['nginx::package'],
|
||||
notify => Class['nginx::service'],
|
||||
fastcgi_cache_path => $fastcgi_cache_path,
|
||||
}
|
||||
|
||||
class { 'nginx::service':
|
||||
|
|
|
@ -53,6 +53,8 @@ class nginx::params {
|
|||
$nx_proxy_cache_max_size = '500m'
|
||||
$nx_proxy_cache_inactive = '20m'
|
||||
|
||||
$nx_fastcgi_cache_path = false
|
||||
|
||||
$nx_client_body_temp_path = "${nx_run_dir}/client_body_temp"
|
||||
$nx_client_body_buffer_size = '128k'
|
||||
$nx_client_max_body_size = '10m'
|
||||
|
|
|
@ -39,6 +39,10 @@ http {
|
|||
proxy_cache_path <%= @proxy_cache_path %> levels=<%= @proxy_cache_levels %> keys_zone=<%= @proxy_cache_keys_zone %> max_size=<%= @proxy_cache_max_size %> inactive=<%= @proxy_cache_inactive %>;
|
||||
<% end -%>
|
||||
|
||||
<% if @fastcgi_cache_path -%>
|
||||
fastcgi_cache_path <%= @fastcgi_cache_path %>;
|
||||
<% end -%>
|
||||
|
||||
<% if @http_cfg_append -%><% @http_cfg_append.sort_by{|k,v| k}.each do |key,value| -%>
|
||||
<%= key %> <%= value %>;
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in a new issue