-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
40 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,65 @@ | ||
|
||
worker_processes {{ env.NGINX_WORKER_PROCESSES }}; | ||
pid /tmp/nginx.pid; | ||
pid /tmp/nginx.pid; | ||
worker_processes {{ env.NGINX_WORKER_PROCESSES }}; | ||
|
||
daemon off; | ||
|
||
{%- if env.DEBUG %} | ||
error_log /dev/stderr debug; | ||
{%- else %} | ||
error_log /dev/stderr {{ env.LOG_LEVEL|lower or 'warn' }}; | ||
{%- endif %} | ||
|
||
events { | ||
worker_connections {{ env.NGINX_WORKER_CONNECTIONS }}; | ||
worker_connections {{ env.NGINX_WORKER_CONNECTIONS }}; | ||
} | ||
|
||
http { | ||
client_body_temp_path /tmp/client_body; | ||
fastcgi_temp_path /tmp/fastcgi_temp; | ||
proxy_temp_path /tmp/proxy_temp; | ||
scgi_temp_path /tmp/scgi_temp; | ||
uwsgi_temp_path /tmp/uwsgi_temp; | ||
include /etc/nginx/mime.types; | ||
default_type application/octet-stream; | ||
|
||
include /etc/nginx/mime.types; | ||
|
||
server_tokens off; | ||
gzip on; | ||
gzip_disable "msie6"; | ||
server_tokens off; | ||
client_max_body_size {{ env.NGINX_MAX_BODY_SIZE or '2M' }}; | ||
|
||
gzip on; | ||
gzip_disable "msie6"; | ||
{%- if env.NGINX_MAX_BODY_SIZE %} | ||
client_max_body_size {{ env.NGINX_MAX_BODY_SIZE }}; | ||
{%- endif %} | ||
log_format main '$remote_addr - $remote_user [$time_local] ' | ||
'"$request" $status $body_bytes_sent ' | ||
'"$http_referer" "$http_user_agent" - $request_time ' | ||
'x_forwarded_for=$http_x_forwarded_for host=$host ' | ||
'$request_id $sent_http_x_request_id'; | ||
|
||
log_format main '$remote_addr - $remote_user [$time_local] ' | ||
'"$request" $status $body_bytes_sent ' | ||
'"$http_referer" "$http_user_agent" - $request_time ' | ||
'x_forwarded_for=$http_x_forwarded_for host=$host ' | ||
'$request_id $sent_http_x_request_id'; | ||
client_body_temp_path /tmp/client_body; | ||
fastcgi_temp_path /tmp/fastcgi_temp; | ||
proxy_temp_path /tmp/proxy_temp; | ||
scgi_temp_path /tmp/scgi_temp; | ||
uwsgi_temp_path /tmp/uwsgi_temp; | ||
|
||
default_type application/octet-stream; | ||
upstream backend { | ||
server 127.0.0.1:29000; | ||
} | ||
|
||
upstream backend { | ||
server 127.0.0.1:29000; | ||
} | ||
server { | ||
listen 8080 default_server http2; | ||
listen [::]:8080 default_server http2; | ||
|
||
server { | ||
listen 8080 default_server; | ||
listen [::]:8080 default_server; | ||
access_log /dev/stdout main; | ||
|
||
access_log /dev/stdout main; | ||
location /api { | ||
include /etc/nginx/uwsgi_params; | ||
uwsgi_pass backend; | ||
|
||
location /api { | ||
include /etc/nginx/uwsgi_params; | ||
uwsgi_pass backend; | ||
|
||
uwsgi_param Host $host; | ||
uwsgi_param X-Real-IP $remote_addr; | ||
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; | ||
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; | ||
} | ||
uwsgi_param Host $host; | ||
uwsgi_param X-Real-IP $remote_addr; | ||
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for; | ||
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto; | ||
} | ||
|
||
root /web; | ||
index index.html; | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
root /web; | ||
index index.html; | ||
location / { | ||
try_files $uri $uri/ /index.html; | ||
} | ||
} | ||
} |