forked from Guovin/iptv-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.conf
46 lines (38 loc) · 1.13 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
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
resolver 114.114.114.114 valid=3s ipv6=off;
merge_slashes off;
listen 2025;
server_name _;
location ~ ^/(https?)://([^/]+)/ {
set $realscheme $1;
set $realhost $2;
rewrite ^/(https?://[^/]+)/(.*) /$2 break;
proxy_pass $realscheme://$realhost;
proxy_set_header Host $realhost;
proxy_set_header X-Forwarded-Host $realhost;
proxy_set_header X-Forwarded-Proto $realscheme;
proxy_set_header X-Path-Style true;
proxy_redirect ~^(https?://.+) /$1;
proxy_ssl_protocols TLSv1.2 TLSv1.3;
proxy_ssl_ciphers HIGH:!aNULL:!MD5;
proxy_ssl_verify off;
}
}
}