-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
92 lines (70 loc) · 1.67 KB
/
nginx.conf
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# worker_processes 1;
# events {
# worker_connections 1024;
# }
# http {
# server {
# listen 8080;
# set $upstream ui;
# server_name localhost;
# server_tokens off;
# gzip on;
# gzip_proxied any;
# gzip_comp_level 4;
# gzip_types text/css application/javascript image/svg+xml;
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection 'upgrade';
# proxy_set_header Host $host;
# proxy_cache_bypass $http_upgrade;
# location /_next/static {
# proxy_pass http://$upstream:3000;
# }
# location /static {
# proxy_ignore_headers Cache-Control;
# proxy_cache_valid 60m;
# proxy_pass http://$upstream:3000;
# }
# location / {
# proxy_pass http://$upstream:3000;
# }
# }
# }
worker_processes 1;
events {
worker_connections 1024;
}
http {
access_log /dev/stdout;
error_log /dev/stderr;
server {
gzip on;
gzip_proxied any;
gzip_comp_level 4;
gzip_types text/css application/javascript image/svg+xml;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
listen 8080;
server_name localhost;
client_max_body_size 100M;
client_body_timeout 10m;
client_header_timeout 10m;
keepalive_timeout 10000;
resolver 127.0.0.11 valid=5s;
set $upstream ui;
location /_next/static {
proxy_pass http://$upstream:4000;
}
location /static {
proxy_ignore_headers Cache-Control;
proxy_cache_valid 60m;
proxy_pass http://$upstream:4000;
}
location / {
proxy_pass http://$upstream:4000;
}
}
}