mirror of
https://github.com/v2fly/v2ray-examples.git
synced 2025-04-02 00:59:29 +08:00
Create nginx.conf
This commit is contained in:
parent
3f9add03f8
commit
819ee592ee
48
VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf
Normal file
48
VLESS-TCP-XTLS-Multi-Web-Nginx/nginx.conf
Normal file
@ -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;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user