MENU

Nginx 反向代理IPTV的一些参数

October 25, 2024 • 已被 155 位童鞋围观过 • 闲言碎语

location / {
  proxy_pass http://123.160.30.13:6610/;
  proxy_set_header Host 123.160.30.13;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Real-Port $remote_port;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Host $host;
  proxy_set_header X-Forwarded-Port $server_port;
  proxy_set_header REMOTE-HOST $remote_addr;
  #
  proxy_connect_timeout 60s;
  proxy_send_timeout 600s;
  proxy_read_timeout 600s;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
}

其实下面的参数 没有多大意义,只要下面这部分就行,考虑到有些服务器需要验证一些其他的信息,用上面的代码更保险。

location / { 
    proxy_pass http://123.160.30.13:6610/; 
    proxy_http_version 1.1; 
}