2
我使用nginx作为使用gunicorn的django应用程序的代理,问题是在某些时候我收到来自另一个站点的POST请求。Nginx + Gunicorn POST请求错误
问题似乎是,nginx没有正确地将POST请求重定向到gunicorn守护进程。
我能做些什么来解决这个问题,我需要的是能够为它到达了gunicorn daemor我Django应用程序来处理它发送POST请求......谢谢你......
这是我的nginx的conf
server {
server_name www.rinconcolombia.com;
access_log /var/log/nginx/rinconcolombia.log;
location/{
ssi on;
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static/ {
autoindex on;
root /home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/;
}
location /static/admin_media/ {
autoindex on;
root /home/rincon/sites/rinconcolombia/checkouts/rinconcolombia/;
}
}
server {
server_name www.rinconcolombia.com;
rewrite ^(.*) http://www.rinconcolombia.com$1;
}
更新应用程序发送POST正在接收错误的请求错误...如果我做手工用resty一个POST或卷曲它确实传递到请求消息给我的服务器...
另外,其他应用程序发送错误的请求...仍然感谢您的答案不得不检查我的nginx配置,以避免将来出现问题。 – maumercado 2011-04-20 13:57:49