forked from aws/opsworks-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf.erb
42 lines (32 loc) · 1.27 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
40
41
42
user <%= node[:nginx][:user] %>;
worker_processes <%= node[:nginx][:worker_processes] %>;
error_log <%= node[:nginx][:log_dir] %>/error.log;
pid /var/run/nginx.pid;
events {
worker_connections <%= node[:nginx][:worker_connections] %>;
}
http {
include <%= node[:nginx][:dir] %>/mime.types;
default_type application/octet-stream;
access_log <%= node[:nginx][:log_dir] %>/access.log;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
<% if node[:nginx][:keepalive] == "on" %>
keepalive_timeout <%= node[:nginx][:keepalive_timeout] %>;
<% end %>
gzip <%= node[:nginx][:gzip] %>;
gzip_static <%= node[:nginx][:gzip_static] %>;
<% if node[:nginx][:gzip] == "on" %>
gzip_http_version <%= node[:nginx][:gzip_http_version] %>;
gzip_comp_level <%= node[:nginx][:gzip_comp_level] %>;
gzip_proxied <%= node[:nginx][:gzip_proxied] %>;
gzip_types <%= node[:nginx][:gzip_types].join(' ') %>;
gzip_vary <%= node[:nginx][:gzip_vary] %>;
gzip_disable "<%= node[:nginx][:gzip_disable] %>";
<% end %>
client_max_body_size <%= node[:nginx][:client_max_body_size] %>;
server_names_hash_bucket_size <%= node[:nginx][:server_names_hash_bucket_size] %>;
include <%= node[:nginx][:dir] %>/conf.d/*.conf;
include <%= node[:nginx][:dir] %>/sites-enabled/*;
}