-
-
Notifications
You must be signed in to change notification settings - Fork 80
/
app-nginx.conf.sigil
52 lines (48 loc) · 1.13 KB
/
app-nginx.conf.sigil
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
43
44
45
46
47
48
49
50
51
52
{{ if ne $.NGINX_WORKERS "" }}
worker_processes {{ $.NGINX_WORKERS }};
{{ else }}
worker_processes 1;
{{ end }}
error_log stderr;
pid nginx.pid;
daemon off;
events {
{{ if ne $.NGINX_WORKER_CONNECTIONS "" }}
worker_connections {{ $.NGINX_WORKER_CONNECTIONS }};
{{ else }}
worker_connections 768;
{{ end }}
}
http {
{{ if ne $.NGINX_CLIENT_BODY_TIMEOUT "" }}
client_body_timeout {{ $.NGINX_CLIENT_BODY_TIMEOUT }};
{{ else }}
client_body_timeout 5;
{{ end }}
types_hash_max_size 2048;
include mime.types;
charset UTF-8;
server {
listen {{ $.PORT }};
server_name _;
{{ if ne $.NGINX_CLIENT_MAX_BODY_SIZE "" }}
client_max_body_size {{ $.NGINX_CLIENT_MAX_BODY_SIZE }}M;
{{ else }}
client_max_body_size 1M;
{{ end }}
{{ if ne $.NGINX_ROOT "" }}
root /app/www/{{ $.NGINX_ROOT }};
{{ else }}
root /app/www;
{{ end }}
index index.html;
port_in_redirect off;
location / {
{{ if ne $.NGINX_DEFAULT_REQUEST "" }}
try_files $uri $uri/ /{{ $.NGINX_DEFAULT_REQUEST }};
{{ else }}
try_files $uri $uri/ =404;
{{ end }}
}
}
}