-
-
Notifications
You must be signed in to change notification settings - Fork 811
/
nginx.conf.erb
39 lines (31 loc) · 1.44 KB
/
nginx.conf.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Generated by Chef for <%= node['fqdn'] %>
# Do NOT modify this file by hand.
#
user <%= @process_user %><% if @process_group != @process_user %> <%= @process_group %><% end %>;
worker_processes <%= @worker_processes %>;
error_log <%= @nginx_log_dir %>/error.log;
pid <%= @pid %>;
<% if (node['platform'] == 'debian' && node['platform_version'].to_i >= 9) || (node['platform'] == 'ubuntu' && node['platform_version'].to_i >= 18) %>
include /etc/nginx/modules-enabled/*.conf;
<% end -%>
<% if %w(amazon centos fedora).include?(node['platform']) -%>
include /usr/share/nginx/modules/*.conf;
<% end -%>
events {
worker_connections <%= @worker_connections %>;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log <%= @nginx_log_dir %>/access.log main;
sendfile <%= @sendfile %>;
tcp_nopush <%= @tcp_nopush %>;
tcp_nodelay <%= @tcp_nodelay %>;
keepalive_timeout <%= @keepalive_timeout %>;
types_hash_max_size <%= @types_hash_max_size %>;
include <%= @nginx_dir %>/mime.types;
default_type application/octet-stream;
include <%= @nginx_dir %>/conf.d/*.conf;
include <%= @nginx_dir %>/conf.http.d/list*.conf;
}