projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
217b7d1
)
Support nginx on 14.04 + dynamic number of worker processes based on CPUs
author
Grant Slater
<git@firefishy.com>
Tue, 16 Dec 2014 15:49:50 +0000
(15:49 +0000)
committer
Grant Slater
<git@firefishy.com>
Tue, 16 Dec 2014 15:49:58 +0000
(15:49 +0000)
cookbooks/nginx/templates/default/nginx.conf.erb
patch
|
blob
|
history
diff --git
a/cookbooks/nginx/templates/default/nginx.conf.erb
b/cookbooks/nginx/templates/default/nginx.conf.erb
index 6133b2404fdef5a11fd21dd1fca3d8e22e7ab48f..c16aa965020cb002c50eb4f8c32302e5b4e66a12 100644
(file)
--- a/
cookbooks/nginx/templates/default/nginx.conf.erb
+++ b/
cookbooks/nginx/templates/default/nginx.conf.erb
@@
-1,7
+1,11
@@
# DO NOT EDIT - This file is being maintained by Chef
-user nginx;
-worker_processes 4;
+<% if node[:lsb][:release].to_f >= 14.04 -%>
+ user www-data;
+<% else -%>
+ user nginx;
+<% end -%>
+worker_processes <%= node['cpu']['total'] %>;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;