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

标签 asp.net ubuntu nginx

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

enter image description here

enter image description here

最佳答案

你应该试试这个

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; 
}

关于asp.net - 在 ubuntu 服务器上部署 asp.net 核心应用程序时,nginx 存在重定向问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59734813/

相关文章:

nginx - 在 nginx 中拒绝所有站点的用户代理的最佳位置

asp.net - 页扩展时,页脚必须始终在底部

启动时运行的 Ubuntu 程序

nginx - 无法连接到 Docker Nginx 构建

ubuntu - aspell api 文档

ubuntu - 防止 neo4j 在启动时启动 (Ubuntu 14.04)

ruby-on-rails - Ruby on Rails 路由 : Multiple namespaces and multiple domains: best practice?

javascript - 如何附加 Html.Action 以使用 javascript 查看

c# - 我如何从代码隐藏中刷新 asp 页面? C#

c# - 身份验证和登录页面 - 我如何进行身份验证?