を使用してuWSGIで私のアプリケーションを提供しています。これはブラウザで127.0.0.1:3031
に行くと動作します。私はNginxを使用したいので、私はそのURLにuwsgi_pass
に言ったが、今は502 Bad Gatewayのエラーが出る。どのようにNginxの背後にuWSGIを置くのですか?代わりにNginxの背後で動作するようにuWSGI HTTPサーバーを変換する
server {
listen 8080;
server_name 127.0.0.1;
location/{
uwsgi_pass 127.0.0.1:3031;
include uwsgi_params;
}
location /static {
alias /static/folder/location;
}
}
2016/05/16 19:50:09 [error] 6810#0: *4 upstream prematurely closed
connection while reading response header from upstream, client:
127.0.0.1, server: 127.0.0.1, request: "GET/HTTP/1.1", upstream:
"uwsgi://127.0.0.1:3031", host: "127.0.0.1:8080"