-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
autorender.portal2.local.conf.template
131 lines (113 loc) · 4.27 KB
/
autorender.portal2.local.conf.template
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
server {
listen 80;
server_name ${NGINX_HOST};
return 301 https://$host$request_uri;
}
server {
listen ${NGINX_PORT} ssl http2;
server_name ${NGINX_HOST};
ssl_certificate /ssl/${NGINX_HOST}.crt;
ssl_certificate_key /ssl/${NGINX_HOST}.key;
ssl_session_cache shared:le_nginx_SSL:10m;
ssl_session_timeout 1440m;
ssl_session_tickets off;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
location / {
proxy_pass http://autorender.server:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
client_max_body_size 150M;
}
location /connect {
proxy_pass http://autorender.server:8001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
}
location /api/v1/videos/upload {
proxy_pass http://autorender.server:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_send_timeout 300s;
proxy_read_timeout 300s;
proxy_buffering off;
client_max_body_size 150M;
}
location ~ /favicon.ico {
alias /storage/files/favicon.ico;
}
location ~ "^/storage/avatars/([0-9]+)$" {
alias /storage/users/$1/avatar;
}
location ~ "^/storage/banners/([0-9]+)$" {
alias /storage/users/$1/banner;
}
location ~ "^/storage/demos/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])$" {
alias /storage/demos/$1.dem;
add_header content-type "application/octet-stream";
add_header content-disposition filename="$1.dem";
}
location ~ "^/storage/demos/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])/fixed$" {
alias /storage/demos/$1_fixed.dem;
add_header content-type "application/octet-stream";
add_header content-disposition filename="$1_fixed.dem";
}
location /storage/files/ {
alias /storage/files/;
if ($request_filename ~ "^/storage/files/(.+\.(png|jpg|jpeg|cfg|txt|mp4|webp|zip))$") {
set $filename $1;
add_header content-disposition filename="$filename";
}
types {
image/png png;
image/jpeg jpg;
image/jpeg jpeg;
text/plain cfg;
text/plain txt;
video/mp4 mp4;
image/webp webp;
application/zip zip;
}
}
location ~ "^/storage/inputs/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])$" {
alias /storage/inputs/$1.bin;
add_header content-type "application/octet-stream";
add_header content-disposition filename="$1.bin";
}
location ~ "^/storage/previews/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])$" {
alias /storage/previews/$1.webp;
add_header content-type "image/webp";
add_header content-disposition filename="$1.webp";
add_header cache-control "public, max-age=31536000";
}
location ~ "^/storage/thumbnails/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])$" {
alias /storage/thumbnails/$1.webp;
add_header content-type "image/webp";
add_header content-disposition filename="$1.webp";
add_header cache-control "public, max-age=31536000";
}
location ~ "^/storage/thumbnails/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])/small$" {
alias /storage/thumbnails/$1_sm.webp;
add_header content-type "image/webp";
add_header content-disposition filename="$1_sm.webp";
add_header cache-control "public, max-age=31536000";
}
location ~ "^/storage/videos/([0-9A-Za-z_-]{10}[048AEIMQUYcgkosw])$" {
alias /storage/videos/$1.mp4;
add_header content-type "video/mp4";
add_header content-disposition filename="$1.mp4";
}
}