Added 4 proxy parameters.
client_body_buffer_size proxy_connect_timeout proxy_read_timeout proxy_send_timeout And reference these variabels in the template.
This commit is contained in:
parent
ba72229437
commit
8613a52be9
5 changed files with 21 additions and 9 deletions
|
@ -14,6 +14,7 @@
|
|||
#
|
||||
# This class file is not called directly
|
||||
class nginx::config(
|
||||
$client_body_buffer_size = $nginx::params::nx_client_body_buffer_size,
|
||||
$client_max_body_size = $nginx::params::nx_client_max_body_size,
|
||||
$confd_purge = $nginx::params::nx_confd_purge,
|
||||
$conf_template = $nginx::params::nx_conf_template,
|
||||
|
@ -40,9 +41,12 @@ class nginx::config(
|
|||
$proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size,
|
||||
$proxy_cache_path = $nginx::params::nx_proxy_cache_path,
|
||||
$proxy_conf_template = $nginx::params::nx_proxy_conf_template,
|
||||
$proxy_connect_timeout = $nginx::params::nx_proxy_connect_timeout,
|
||||
$proxy_headers_hash_bucket_size = $nginx::params::nx_proxy_headers_hash_bucket_size,
|
||||
$proxy_http_version = $nginx::params::nx_proxy_http_version,
|
||||
$proxy_read_timeout = $nginx::params::nx_proxy_read_timeout,
|
||||
$proxy_redirect = $nginx::params::nx_proxy_redirect,
|
||||
$proxy_send_timeout = $nginx::params::nx_proxy_send_timeout,
|
||||
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
||||
$server_tokens = $nginx::params::nx_server_tokens,
|
||||
$types_hash_bucket_size = $nginx::params::nx_types_hash_bucket_size,
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
# include nginx
|
||||
# }
|
||||
class nginx (
|
||||
$client_body_buffer_size = $nginx::params::nx_client_body_buffer_size,
|
||||
$client_max_body_size = $nginx::params::nx_client_max_body_size,
|
||||
$confd_purge = $nginx::params::nx_confd_purge,
|
||||
$configtest_enable = $nginx::params::nx_configtest_enable,
|
||||
|
@ -65,9 +66,12 @@ class nginx (
|
|||
$proxy_cache_max_size = $nginx::params::nx_proxy_cache_max_size,
|
||||
$proxy_cache_path = $nginx::params::nx_proxy_cache_path,
|
||||
$proxy_conf_template = $nginx::params::nx_proxy_conf_template,
|
||||
$proxy_connect_timeout = $nginx::params::nx_proxy_connect_timeout,
|
||||
$proxy_headers_hash_bucket_size = $nginx::params::nx_proxy_headers_hash_bucket_size,
|
||||
$proxy_http_version = $nginx::params::nx_proxy_http_version,
|
||||
$proxy_read_timeout = $nginx::params::nx_proxy_read_timeout,
|
||||
$proxy_redirect = $nginx::params::nx_proxy_redirect,
|
||||
$proxy_send_timeout = $nginx::params::nx_proxy_send_timeout,
|
||||
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
||||
$server_tokens = $nginx::params::nx_server_tokens,
|
||||
$service_ensure = $nginx::params::nx_service_ensure,
|
||||
|
@ -158,6 +162,7 @@ class nginx (
|
|||
}
|
||||
|
||||
class { 'nginx::config':
|
||||
client_body_buffer_size => $client_body_buffer_size,
|
||||
client_max_body_size => $client_max_body_size,
|
||||
confd_purge => $confd_purge,
|
||||
conf_template => $conf_template,
|
||||
|
@ -184,9 +189,12 @@ class nginx (
|
|||
proxy_cache_max_size => $proxy_cache_max_size,
|
||||
proxy_cache_path => $proxy_cache_path,
|
||||
proxy_conf_template => $proxy_conf_template,
|
||||
proxy_connect_timeout => $proxy_connect_timeout,
|
||||
proxy_headers_hash_bucket_size => $proxy_headers_hash_bucket_size,
|
||||
proxy_http_version => $proxy_http_version,
|
||||
proxy_read_timeout => $proxy_read_timeout,
|
||||
proxy_redirect => $proxy_redirect,
|
||||
proxy_send_timeout => $proxy_send_timeout,
|
||||
proxy_set_header => $proxy_set_header,
|
||||
server_tokens => $server_tokens,
|
||||
vhost_purge => $vhost_purge,
|
||||
|
|
|
@ -111,10 +111,10 @@ define nginx::resource::location (
|
|||
'index.htm',
|
||||
'index.php'],
|
||||
$proxy = undef,
|
||||
$proxy_redirect = $nginx::params::nx_proxy_redirect,
|
||||
$proxy_redirect = $nginx::config::proxy_redirect,
|
||||
$proxy_read_timeout = $nginx::config::proxy_read_timeout,
|
||||
$proxy_connect_timeout = $nginx::params::nx_proxy_connect_timeout,
|
||||
$proxy_set_header = $nginx::params::nx_proxy_set_header,
|
||||
$proxy_connect_timeout = $nginx::config::proxy_connect_timeout,
|
||||
$proxy_set_header = $nginx::config::proxy_set_header,
|
||||
$fastcgi = undef,
|
||||
$fastcgi_params = '/etc/nginx/fastcgi_params',
|
||||
$fastcgi_script = undef,
|
||||
|
|
|
@ -151,8 +151,8 @@ define nginx::resource::vhost (
|
|||
$ssl_trusted_cert = undef,
|
||||
$spdy = $nginx::params::nx_spdy,
|
||||
$proxy = undef,
|
||||
$proxy_read_timeout = $nginx::config::nx_proxy_read_timeout,
|
||||
$proxy_connect_timeout = $nginx::config::nx_proxy_connect_timeout,
|
||||
$proxy_read_timeout = $nginx::config::proxy_read_timeout,
|
||||
$proxy_connect_timeout = $nginx::config::proxy_connect_timeout,
|
||||
$proxy_set_header = [],
|
||||
$proxy_cache = false,
|
||||
$proxy_cache_valid = false,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
proxy_redirect <%= @proxy_redirect %>;
|
||||
client_max_body_size <%= @client_max_body_size %>;
|
||||
client_body_buffer_size <%= scope.lookupvar('nginx::config::nx_client_body_buffer_size') %>;
|
||||
proxy_connect_timeout <%= scope.lookupvar('nginx::config::nx_proxy_connect_timeout') %>;
|
||||
proxy_send_timeout <%= scope.lookupvar('nginx::config::nx_proxy_send_timeout') %>;
|
||||
proxy_read_timeout <%= scope.lookupvar('nginx::config::nx_proxy_read_timeout') %>;
|
||||
client_body_buffer_size <%= @client_body_buffer_size %>;
|
||||
proxy_connect_timeout <%= @proxy_connect_timeout %>;
|
||||
proxy_send_timeout <%= @proxy_send_timeout %>;
|
||||
proxy_read_timeout <%= @proxy_read_timeout %>;
|
||||
proxy_buffers <%= @proxy_buffers %>;
|
||||
proxy_buffer_size <%= @proxy_buffer_size %>;
|
||||
proxy_http_version <%= @proxy_http_version %>;
|
||||
|
|
Loading…
Reference in a new issue