-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnginx.conf
55 lines (52 loc) · 1.61 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
upstream gravitlauncher {
server 127.0.0.1:9274;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443 ssl http2;
server_name api.ВАШ_ДОМЕН.ru;
charset utf-8;
#access_log /var/log/nginx/launcher.access.log main;
#error_log /var/log/nginx/launcher.error.log notice;
keepalive_timeout 70;
root /ПУТЬ/ДО/updates;
ssl_certificate /ПУТЬ/ДО/certificate.pem;
ssl_certificate_key /ПУТЬ/ДО/cert.key;
location / {
}
location /api {
proxy_pass http://gravitlauncher;
proxy_http_version 1.1;
real_ip_header X-Forwarded-For;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /skinapi/ {
proxy_pass http://127.0.0.1:8123/;
proxy_http_version 1.1;
real_ip_header X-Forwarded-For;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /skinapi/pay_check {
allow 185.71.76.0/27;
allow 185.71.77.0/27;
allow 77.75.153.0/25;
allow 77.75.156.11;
allow 77.75.156.35;
allow 77.75.154.128/25;
allow 2a02:5180::/32;
deny all;
}
location ~ /\.(?!well-known).* {
deny all;
}
}