1. 发送域名:$host
  2. nginx 反代配置
location ^~ /
{
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header Range $http_range;
  proxy_set_header If-Range $http_if_range;
  proxy_redirect off;
  proxy_pass http://127.0.0.1:5244;
  # the max size of file to upload
  client_max_body_size 200000m;

}
  1. 删除以下配置
- location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md
- location ~ .\*\.(gif|jpg|jpeg|png|bmp|swf)$
- location ~ .\*\.(js|css)?$
  1. 宝塔禁用Nginx反代缓存
proxy_cache cache_one; # 删除这一行
proxy_max_temp_file_size 0; #加上这一行
如果觉得我的文章对你有用,请随意赞赏