]> git.openstreetmap.org Git - chef.git/blob - cookbooks/nginx/templates/default/nginx.conf.erb
Include WB items in regular search results by dflt
[chef.git] / cookbooks / nginx / templates / default / nginx.conf.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 user  www-data;
4 worker_processes auto;
5 worker_cpu_affinity auto;
6 worker_rlimit_nofile 98304;
7
8 error_log  /var/log/nginx/error.log warn;
9 pid        /var/run/nginx.pid;
10
11
12 events {
13     worker_connections  8192;
14 }
15
16 http {
17     include       /etc/nginx/mime.types;
18     default_type  application/octet-stream;
19
20     server_names_hash_bucket_size 128;
21
22 <% if node[:nginx][:access_log] -%>
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  <%= node[:nginx][:access_log] %>  main  buffer=32k flush=1m;
28 <% else -%>
29     access_log  off;
30 <% end -%>
31
32     keepalive_timeout  65;
33
34     server_tokens off;
35
36     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
37     ssl_ciphers <%= node[:ssl][:ciphers] -%>;
38     ssl_prefer_server_ciphers on;
39     ssl_session_cache shared:SSL:50m;
40     ssl_session_timeout 30m;
41     ssl_stapling on;
42     ssl_dhparam /etc/ssl/certs/dhparam.pem;
43     resolver <%= @resolvers.join(" ") %>;
44     resolver_timeout 5s;
45
46     <% if node['nginx']['cache']['fastcgi']['enable'] -%>
47     fastcgi_cache_path /var/cache/nginx/fastcgi-cache levels=1:2 keys_zone=<%= node['nginx']['cache']['fastcgi']['keys_zone'] %> inactive=<%= node['nginx']['cache']['fastcgi']['inactive'] %> max_size=<%= node['nginx']['cache']['fastcgi']['max_size'] %>;
48     <% end -%>
49     <% if node['nginx']['cache']['proxy']['enable'] -%>
50     proxy_cache_path /var/cache/nginx/proxy-cache levels=1:2 keys_zone=<%= node['nginx']['cache']['proxy']['keys_zone'] %> inactive=<%= node['nginx']['cache']['proxy']['inactive'] %> max_size=<%= node['nginx']['cache']['proxy']['max_size'] %>;
51     <% end -%>
52
53     include /etc/nginx/conf.d/*.conf;
54 }