-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathnginx.conf
86 lines (79 loc) · 1.94 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
# Generated by nginxconfig.io
user www-data;
pid /run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 65535;
events {
multi_accept on;
worker_connections 65535;
}
http {
charset utf-8;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
types_hash_max_size 2048;
server_names_hash_bucket_size 128;
server_names_hash_max_size 512;
client_max_body_size 16M;
# logging
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log warn;
# Compression
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types application/javascript application/json application/xml text/css text/plain text/xml application/xml+rss application/grpc+proto;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
upstream vless_grpc {
server 127.0.0.1:5000;
}
upstream vmess_grpc {
server 127.0.0.1:5100;
}
upstream trojan_grpc {
server 127.0.0.1:5200;
}
upstream ss_grpc {
server 127.0.0.1:5300;
}
upstream ss22_grpc {
server 127.0.0.1:5400;
}
server {
listen 8443 proxy_protocol;
http2 on;
set_real_ip_from 127.0.0.1;
real_ip_header proxy_protocol;
server_name web.com;
server_name *.web.com;
root /var/www/html;
index index.html;
# gRPC
location /vless-grpc {
grpc_pass grpc://vless_grpc;
}
location /vmess-grpc {
grpc_pass grpc://vmess_grpc;
}
location /trojan-grpc {
grpc_pass grpc://trojan_grpc;
}
location /ss-grpc {
grpc_pass grpc://ss_grpc;
}
location /ss22-grpc {
grpc_pass grpc://ss22_grpc;
}
}
server {
listen 8080 proxy_protocol default_server;
listen 8443 proxy_protocol default_server;
http2 on;
set_real_ip_from 127.0.0.1;
real_ip_header proxy_protocol;
}
}