Skip to content

Commit

Permalink
Merge pull request sous-chefs#95 from lukasreinfurt/master
Browse files Browse the repository at this point in the history
[COOK-2455] Support sendfile option (nginx.conf)
  • Loading branch information
Joshua Timberman committed Feb 22, 2013
2 parents 3e356ea + af0e50c commit 0866e04
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ config file.
* `node['nginx']['disable_access_log']` - set to true to disable the
general access log, may be useful on high traffic sites.
* `node['nginx']['default_site_enabled']` - enable the default site
* `node['nginx']['sendfile']` - Whether to use `sendfile`. Defaults to "on".
* `node['nginx']['install_method']` - Whether nginx is installed from
packages or from source.
* `node['nginx']['types_hash_max_size']` - Used for the
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
default['nginx']['multi_accept'] = false
default['nginx']['event'] = nil
default['nginx']['server_names_hash_bucket_size'] = 64
default['nginx']['sendfile'] = 'on'

default['nginx']['disable_access_log'] = false
default['nginx']['install_method'] = 'package'
Expand Down
5 changes: 5 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,8 @@
attribute "nginx/default_site_enabled",
:display_name => "Default site enabled",
:default => "true"

attribute "nginx/sendfile",
:display_name => "Nginx sendfile",
:description => "Whether to enable sendfile",
:default => "on"
2 changes: 1 addition & 1 deletion templates/default/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ http {
access_log <%= node['nginx']['log_dir'] %>/access.log;
<% end %>

sendfile on;
sendfile <%= node['nginx']['sendfile'] %>;
tcp_nopush on;
tcp_nodelay on;

Expand Down

0 comments on commit 0866e04

Please sign in to comment.