繁体   English   中英

在ubuntu服务器上部署asp.net核心应用程序时,nginx存在重定向问题

[英]There is a re-direct issue with nginx when deploying asp.net core application on ubuntu server

我在部署asp.net核心应用程序时遇到了nginx服务器的问题,实际上它总是将其重定向到本地主机,但我在nginx配置文件上传递了proxy_pass http://127.0.0.1:5000

在此处输入图片说明

在此处输入图片说明

你应该试试这个

location / {
      # http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
      resolver 127.0.0.1 valid=30s ipv6=off;
      # http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver_timeout
      # give up and response error 
      resolver_timeout 5s;
      proxy_pass http://127.0.0.1:5000; 
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM