-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
66 lines (58 loc) · 2.06 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
# Flowinity NGINX config
# Change the port if you altered it in the setup wizard, or Docker config.
upstream rest {
server localhost:34582;
}
upstream graphql {
server localhost:34583;
}
server {
server_name CHANGE_ME;
listen [::]:443 ssl;
listen 443 ssl;
# Specify your own max body size if you want to limit uploaded file sizes, default is 10G
client_max_body_size 10G;
gzip on;
location /gateway {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
gzip_vary on;
gzip_comp_level 9;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application>
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://rest;
}
location /i/ {
add_header Cache-Control "public";
expires 2d;
proxy_pass http://rest;
}
location ~* \.(css|js)$ {
gzip on;
add_header Cache-Control "public";
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
expires 16d;
proxy_pass http://rest;
}
location /graphql {
proxy_pass http://graphql;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
location / {
proxy_pass http://rest;
proxy_set_header X-Forwarded-For $remote_addr;
}
include mime.types;
ssl_certificate CHANGE_ME;
ssl_certificate_key CHANGE_ME;
access_log /var/log/nginx/CHANGE_ME.access.log;
error_log /var/log/nginx/CHANGE_ME.error.log warn;
}