我在部署 asp.net 核心应用程序时遇到了 nginx 服务器的问题,实际上它总是将它重定向到 localhost 但我通过了 proxy_pass http://127.0.0.1:5000在 nginx 配置文件上。
最佳答案
你应该试试这个
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/