2024-09-21 06:34:10 +00:00
|
|
|
{{ if ne $.NGINX_WORKERS "" }}
|
|
|
|
worker_processes {{ $.NGINX_WORKERS }};
|
|
|
|
{{ else }}
|
|
|
|
worker_processes 1;
|
|
|
|
{{ end }}
|
2013-08-18 02:53:44 +00:00
|
|
|
error_log stderr;
|
2013-08-17 06:41:19 +00:00
|
|
|
pid nginx.pid;
|
|
|
|
daemon off;
|
|
|
|
|
|
|
|
events {
|
2024-09-21 06:34:10 +00:00
|
|
|
{{ if ne $.NGINX_WORKER_CONNECTIONS "" }}
|
|
|
|
worker_connections {{ $.NGINX_WORKER_CONNECTIONS }};
|
|
|
|
{{ else }}
|
|
|
|
worker_connections 768;
|
|
|
|
{{ end }}
|
2014-06-20 17:37:51 +00:00
|
|
|
}
|
2013-08-17 06:41:19 +00:00
|
|
|
|
|
|
|
http {
|
2024-09-21 06:34:10 +00:00
|
|
|
{{ if ne $.NGINX_CLIENT_BODY_TIMEOUT "" }}
|
|
|
|
client_body_timeout {{ $.NGINX_CLIENT_BODY_TIMEOUT }};
|
|
|
|
{{ else }}
|
|
|
|
client_body_timeout 5;
|
|
|
|
{{ end }}
|
2014-11-06 22:29:41 +00:00
|
|
|
types_hash_max_size 2048;
|
|
|
|
include mime.types;
|
2020-06-11 19:33:31 +00:00
|
|
|
charset UTF-8;
|
2024-09-21 06:34:10 +00:00
|
|
|
|
2014-11-06 22:29:41 +00:00
|
|
|
server {
|
2016-09-20 06:18:28 +00:00
|
|
|
listen {{ $.PORT }};
|
2014-11-06 22:29:41 +00:00
|
|
|
server_name _;
|
2024-09-21 06:34:10 +00:00
|
|
|
{{ if ne $.NGINX_CLIENT_MAX_BODY_SIZE "" }}
|
|
|
|
client_max_body_size {{ $.NGINX_CLIENT_MAX_BODY_SIZE }}M;
|
|
|
|
{{ else }}
|
|
|
|
client_max_body_size 1M;
|
|
|
|
{{ end }}
|
2016-09-20 06:18:28 +00:00
|
|
|
{{ if ne $.NGINX_ROOT "" }}
|
|
|
|
root /app/www/{{ $.NGINX_ROOT }};
|
|
|
|
{{ else }}
|
2015-10-06 00:03:08 +00:00
|
|
|
root /app/www;
|
2016-09-20 06:18:28 +00:00
|
|
|
{{ end }}
|
2014-11-06 22:29:41 +00:00
|
|
|
index index.html;
|
2017-04-14 14:29:37 +00:00
|
|
|
port_in_redirect off;
|
2016-09-20 05:15:28 +00:00
|
|
|
|
2016-06-28 11:45:23 +00:00
|
|
|
location / {
|
2022-08-07 23:10:31 +00:00
|
|
|
{{ if ne $.NGINX_DEFAULT_REQUEST "" }}
|
|
|
|
try_files $uri $uri/ /{{ $.NGINX_DEFAULT_REQUEST }};
|
|
|
|
{{ else }}
|
|
|
|
try_files $uri $uri/ =404;
|
|
|
|
{{ end }}
|
2016-06-28 11:45:23 +00:00
|
|
|
}
|
2014-11-06 22:29:41 +00:00
|
|
|
}
|
2014-06-20 17:37:51 +00:00
|
|
|
}
|