我使用的是nginx、django和gunicorn,在我的nginx站点启用配置中,我一直在获取代理传递行上的错误无效参数数量。我相信根据nginx文档,这是正确的方法。我哪里出错了?我真的被卡住了。
upstream app_server{
server xxx.xxx.xx.xxx:8000 fail_timeout=0;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host
proxy_redirect off;
proxy_pass http://app_server;
}
我检查了以下解决方案@[类似问题][1],但它没有回答为什么上面的配置不工作[1]:
nginx invalid number of arguments in "proxy_pass" directive
.
我甚至尝试使用代理通行证
http://xxx.xxx.xx.xxx:8000
;仍然是同样的错误。