-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.conf
89 lines (70 loc) · 2.29 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
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
client_max_body_size 10M;
server {
listen 80;
server_name vilka.online;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2 default_server;
listen [::]:443 ssl default_server;
server_name vilka.online;
root /nginx/var/www/frontend;
index index.html;
ssl_certificate /etc/letsencrypt/live/vilka.online/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/vilka.online/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'HIGH:!aNULL:!MD5';
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.html;
}
location ~ ^/api/v1/auth(/.*)?$ {
proxy_pass http://185.241.194.197:8082;
proxy_set_header Host $host;
}
location ~ ^/(image|files)(/.*)?$ {
proxy_pass http://185.241.194.197:8083;
proxy_set_header Host $host;
}
location ~ ^/api/v1/profile(s|/.*)?$ {
proxy_pass http://185.241.194.197:8084;
proxy_set_header Host $host;
}
location ~ ^/api/v1/feed(/.*)?$ {
proxy_pass http://185.241.194.197:8085;
proxy_set_header Host $host;
}
location ~ ^/api/v1/community(/.*)?$ {
proxy_pass http://185.241.194.197:8086;
proxy_set_header Host $host;
}
location /api/v1/message/ws {
proxy_pass http://185.241.194.197:8087;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_read_timeout 3600;
proxy_send_timeout 3600;
}
location ~ ^/api/v1/messages(/.*)?$ {
proxy_pass http://185.241.194.197:8087;
proxy_set_header Host $host;
}
location ~ ^/api/v1/stickers(/.*)?$ {
proxy_pass http://185.241.194.197:8088;
proxy_set_header Host $host;
}
}
}