location /api { 
      proxy_pass  xxxx.xxx.com/xxxx # 接口的url;
      proxy_redirect off;
      # 后端的Web服务器可以通过X-Forwarded-For获取用户真实IP
      proxy_set_header  Host  $host;
      proxy_set_header  X-Real-IP  $remote_addr;  
      proxy_set_header  X-Forwarded-For  $proxy_add_x_forwarded_for;
      proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
}

https://blog.csdn.net/qq_35687296/article/details/98511005

相关文章:

  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2020-09-30
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-01-06
相关资源
相似解决方案