-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdefault.conf
55 lines (43 loc) · 1.19 KB
/
default.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
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=90r/m;
# proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=STATIC:10m inactive=7d use_temp_path=off;
upstream gui {
server gui:3000;
}
upstream api {
server backend:5000;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name _;
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;
# proxy_set_header Host $http_host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# Define the maximum file size on file uploads
client_max_body_size 5M;
client_body_buffer_size 5M;
ssl_certificate "/etc/certs/nginx.crt";
ssl_certificate_key "/etc/certs/nginx.key";
limit_req zone=mylimit burst=60 nodelay;
location /api {
proxy_pass http://api;
}
location / {
proxy_pass http://gui;
}
}