在部署asp.net核心应用程序时,我遇到了nginx服务器的问题,实际上它始终将其重定向到localhost,但是我在nginx配置文件上传递了proxy_pass http://127.0.0.1:5000。
答案 0 :(得分:1)
您应该尝试
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;
}