-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyour-domain.tld-nginx
33 lines (26 loc) · 1.02 KB
/
your-domain.tld-nginx
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
server {
# SSL configuration
listen 443 ssl default_server;
root /var/www/html;
ssl_certificate /etc/letsencrypt/live/your-domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/your-domain.tld/privkey.pem;
ssl_ciphers HIGH:!aNULL:!MD5;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name your-domain.tld;
location / {
}
location = / {
return 301 https://your-domain.tld/;
}
location /v2ray {
proxy_redirect off;
proxy_pass http://127.0.0.1:23339/v2ray;
proxy_http_version 1.1;
proxy_set_header Host "your-domain.tld";
proxy_set_header Connection "Upgrade";
proxy_set_header Upgrade "WebSocket";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_intercept_errors on;
}
}