forked from Flowinity/Flowinity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
53 lines (47 loc) · 1.72 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
# TPU NGINX config
# Change the port if you altered it in the setup wizard, or Docker config.
upstream tpu {
server localhost:34582;
}
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 /socket.io {
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://tpu;
}
location /i/ {
add_header Cache-Control "public";
expires 2d;
proxy_pass http://tpu;
}
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://tpu;
}
location / {
proxy_pass http://tpu;
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;
}