-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
60 lines (52 loc) · 1.9 KB
/
nginx.conf
File metadata and controls
60 lines (52 loc) · 1.9 KB
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
events {
worker_connections 1024;
}
http {
map $http_host $browser_authority {
default $http_host; # includes :port if the browser used one
"" $host; # fallback (rare)
}
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18;
set_real_ip_from 108.162.192.0/18;
set_real_ip_from 190.93.240.0/20;
set_real_ip_from 188.114.96.0/20;
set_real_ip_from 197.234.240.0/22;
set_real_ip_from 198.41.128.0/17;
set_real_ip_from 162.158.0.0/15;
set_real_ip_from 104.16.0.0/12;
set_real_ip_from 172.64.0.0/13;
set_real_ip_from 131.0.72.0/22;
real_ip_header CF-Connecting-IP;
server {
listen 42835 ssl http2;
server_name localhost:42835;
ssl_certificate /etc/nginx/certs/cert.pem;
ssl_certificate_key /etc/nginx/certs/key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
error_page 497 @handle_plain_http;
location @handle_plain_http {
return 301 https://$host:42835$request_uri;
}
location / {
proxy_pass http://sova:42835;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "keep-alive";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache off;
proxy_buffering off;
proxy_read_timeout 24h;
proxy_send_timeout 24h;
client_max_body_size 64M; # change this to the value of max content length config in config.toml
proxy_redirect ~^https?://[^/]+(.*)$ $scheme://$browser_authority$1;
}
}
}