Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy http version #50

Merged
merged 3 commits into from
May 6, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
$worker_processes = $nginx::params::nx_worker_processes,
$worker_connections = $nginx::params::nx_worker_connections,
$proxy_set_header = $nginx::params::nx_proxy_set_header,
$proxy_http_version = $nginx::params::nx_proxy_http_version,
$confd_purge = $nginx::params::nx_confd_purge,
$server_tokens = $nginx::params::nx_server_tokens
) inherits nginx::params {
Expand Down
10 changes: 6 additions & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# Parameters:
#
# There are no default parameters for this class. All module parameters are managed
# via the nginx::params class
# There are no default parameters for this class. All module parameters are
# managed via the nginx::params class
#
# Actions:
#
Expand All @@ -32,6 +32,7 @@
$worker_processes = $nginx::params::nx_worker_processes,
$worker_connections = $nginx::params::nx_worker_connections,
$proxy_set_header = $nginx::params::nx_proxy_set_header,
$proxy_http_version = $nginx::params::nx_proxy_http_version,
$confd_purge = $nginx::params::nx_confd_purge,
$configtest_enable = $nginx::params::nx_configtest_enable,
$service_restart = $nginx::params::nx_service_restart,
Expand All @@ -49,15 +50,16 @@
worker_processes => $worker_processes,
worker_connections => $worker_connections,
proxy_set_header => $proxy_set_header,
proxy_http_version => $proxy_http_version,
confd_purge => $confd_purge,
server_tokens => $server_tokens,
require => Class['nginx::package'],
notify => Class['nginx::service'],
}

class { 'nginx::service':
class { 'nginx::service':
configtest_enable => $configtest_enable,
service_restart => $service_restart,
service_restart => $service_restart,
}

# Allow the end user to establish relationships to the "main" class
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
$nx_proxy_send_timeout = '90'
$nx_proxy_read_timeout = '90'
$nx_proxy_buffers = '32 4k'
$nx_proxy_http_version = '1.0'

$nx_logdir = $::kernel ? {
/(?i-mx:linux)/ => '/var/log/nginx',
Expand Down
1 change: 1 addition & 0 deletions templates/conf.d/proxy.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ proxy_connect_timeout <%= scope.lookupvar('nginx::params::nx_proxy_connect_tim
proxy_send_timeout <%= scope.lookupvar('nginx::params::nx_proxy_send_timeout') %>;
proxy_read_timeout <%= scope.lookupvar('nginx::params::nx_proxy_read_timeout') %>;
proxy_buffers <%= scope.lookupvar('nginx::params::nx_proxy_buffers') %>;
proxy_http_version <%= @proxy_http_version %>;
<% proxy_set_header.each do |header| %>
proxy_set_header <%= header %>;<% end %>
6 changes: 4 additions & 2 deletions templates/vhost/vhost_location_proxy.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
location <%= location %> {
<% if @location_cfg_prepend -%><% location_cfg_prepend.each do |key,value| -%>
<%= key %> <%= value %>;<% end -%><% end -%>
<%= key %> <%= value %>;
<% end -%><% end -%>
proxy_pass <%= proxy %>;
proxy_read_timeout <%= proxy_read_timeout %>;
<% if @location_cfg_append -%><% location_cfg_append.each do |key,value| -%>
<%= key %> <%= value %>;<% end -%><% end -%>
<%= key %> <%= value %>;
<% end -%><% end -%>
}