From 819ee592ee5f61a47491b20721e3a50a622a28e4 Mon Sep 17 00:00:00 2001 From: Rakau <luojiayu09@gmail.com> Date: Sat, 14 Nov 2020 20:22:06 +0800 Subject: [PATCH] Create nginx.conf --- VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf diff --git a/VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf b/VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf new file mode 100644 index 0000000..ed0e027 --- /dev/null +++ b/VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf @@ -0,0 +1,48 @@ +server { + listen 80 http2 proxy_protocol; + set_real_ip_from 127.0.0.1; + real_ip_header proxy_protocol; + server_name v2raydomain.xxx; + index xxxx; + root /love/v2ray; +} + +server { + listen 127.0.0.1:8443 ssl http2 proxy_protocol; + set_real_ip_from 127.0.0.1; + real_ip_header proxy_protocol; + server_name domain.xxx; + index xxxx; + root /domain; +} + +server { + listen 127.0.0.1:8443 ssl http2 proxy_protocol; + set_real_ip_from 127.0.0.1; + real_ip_header proxy_protocol; + server_name domain2.xxx; + index xxxx; + root /domain2; +} + +stream { + map $ssl_preread_server_name $backend_name { + v2raydomain.xxx v2ray; + default web; + } + + upstream v2ray { + server 127.0.0.1:8080; + } + + upstream web { + server 127.0.0.1:8443; + } + + server { + listen 443 reuseport; + listen [::]:443 reuseport; + proxy_pass $backend_name; + proxy_protocol on; + ssl_preread on; + }