我正嘗試使用uWSGI在NGINX上託管瓶應用程序。NGINX + uWSGI連接重置通過對端
這裏是我的nginx.conf
location /myapp/ {
include uwsgi_params;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param Host $http_host;
uwsgi_param UWSGI_SCRIPT myapp;
uwsgi_pass 127.0.0.1:8080;
}
我,因爲這
uwsgi --enable-threads --socket :8080 --plugin python -- wsgi-file ./myApp/myapp.py
運行uwsgi我使用POST請求。對於那個使用開發Http客戶端。當我發送
http://localhost/myapp
uWSGI服務器接收請求,並打印
[pid: 4683|app: 0|req: 1/1] 127.0.0.1() {50 vars in 806 bytes} [Thu Oct 25 12:29:36 2012] POST /myapp => generated 737 bytes in 11 msecs (HTTP/1.1 404) 2 headers in 87 bytes (1 switches on core 0)
但在Nginx的錯誤日誌
2012/10/25 12:20:16 [error] 4364#0: *11 readv() failed (104: Connection reset by peer) while reading upstream, client: 127.0.0.1, server: localhost, request: "POST /myApp/myapp/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:8080", host: "localhost"
怎麼辦請求肚裏無限?
我已經嘗試過 - post-buffering 32768.仍然沒有工作 –
您是否在應用程序中使用了發佈數據? – RickyA