]> git.openstreetmap.org Git - chef.git/blob - cookbooks/nginx/templates/default/nginx.conf.erb
c16aa965020cb002c50eb4f8c32302e5b4e66a12
[chef.git] / cookbooks / nginx / templates / default / nginx.conf.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <% if node[:lsb][:release].to_f >= 14.04 -%>
4   user  www-data;
5 <% else -%>
6   user  nginx;
7 <% end -%>
8 worker_processes <%= node['cpu']['total'] %>;
9
10 error_log  /var/log/nginx/error.log warn;
11 pid        /var/run/nginx.pid;
12
13
14 events {
15     worker_connections  1024;
16 }
17
18
19 http {
20     include       /etc/nginx/mime.types;
21     default_type  application/octet-stream;
22
23     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
24                       '$status $body_bytes_sent "$http_referer" '
25                       '"$http_user_agent" "$http_x_forwarded_for"';
26
27     access_log  /var/log/nginx/access.log  main;
28
29     sendfile        on;
30     #tcp_nopush     on;
31
32     keepalive_timeout  65;
33
34     #gzip  on;
35
36     include /etc/nginx/conf.d/*.conf;
37 }