文件:
blogtest_nginx.conf
the upstream component nginx needs to connect to
upstream django {
server 127.0.0.1:8000; # for a web port socket (we'll use this first)
}
configuration of the server
server {
listen 8000;
server_name .example.com; # substitute your machine's IP address or FQDN
charset utf-8;
client_max_body_size 75M; # adjust to taste
location /media {
alias /home/aljun/djangotest/blogtest/media; # your Django project's media files - amend as required
}
location /static {
alias /home/aljun/djangotest/blogtest/statices; # your Django project's static files - amend as required
}
location / {
uwsgi_pass django;
include /home/aljun/djangotest/blogtest/uwsgi_params; # the uwsgi_params file you installed
}
}
当我执行:
uwsgi --socket :8001 --wsgi-file test.py
得到的却是400 badrequest
但是我的nginx跑起来了,http://localhost:8000/static/github1.css是有反应的
terminal的报错是
invalid request block size: 21573 (max 4096)...skip
求大神帮解答
而且这之前用http就没事,而用了socket就出问题了
我之前是server 127.0.0.1.8001,也是400,才改成的8000的,测试uwsgi过了,用http而不是socket时是可一运行test.py的
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.