-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
104 lines (78 loc) · 2.32 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
93
94
95
96
97
98
99
100
101
102
103
104
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 1024;
# multi_accept on;
}
http{
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
proxy_cache_path /var/cache/nginx/photos_cache keys_zone=photos_cache:10m;
gzip on;
http2 on;
server {
listen 443 ssl;
http2 on;
root /var/www/html;
client_max_body_size 100M;
server_name umlaut-bmstu.me;
ssl_certificate /etc/keys/umlaut-bmstu.me/fullchain.pem;
ssl_certificate_key /etc/keys/umlaut-bmstu.me/privkey.pem;
location / {
index index.html;
try_files $uri /index.html;
}
location /csat/ {
index csat/index.html;
try_files $uri /csat/index.html;
}
location /photos/ {
proxy_pass http://minio:9000/;
proxy_cache photos_cache;
proxy_cache_valid 200 302 304 10m;
proxy_cache_valid 404 1m;
client_max_body_size 100M;
}
location /api/ {
proxy_pass http://umlaut:8000/api/;
client_max_body_size 100M;
}
location /swagger/ {
proxy_pass http://umlaut:8000/swagger/;
client_max_body_size 100M;
}
location /websocket {
proxy_pass http://umlaut:8000/api/v1/ws/messenger;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
}
server {
listen 80;
server_name umlaut-bmstu.me;
return 301 https://umlaut-bmstu.me/;
}
server {
listen 8050;
server_name umlaut-bmstu.me;
location / {
proxy_pass http://grafana:3000/;
client_max_body_size 100M;
}
}
}