我可以成功运行我的django站点,使用:
fadedbee@box:/srv/myproject $ uwsgi --http :8000 --module myproject.wsgi
字符串
我可以将浏览器指向端口8000并获得网页(没有静态内容,正如预期的那样)。
在遵循https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html并可能犯了几个错误之后,nginx尝试向上游发送请求,但最终超时。
当我对端口8000使用浏览器时,我可以看到预期的HTTP协议:
0x0030: 1b11 0088 4745 5420 2f20 4854 5450 2f31 ....GET./.HTTP/1
0x0040: 2e31 0d0a 486f 7374 3axx xxxx xxxx xxxx .1..Host:xxxxxxx
0x0050: xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxxxxxxxxxxxxxx
0x0060: xx3a 3830 3030 0d0a 5573 6572 2d41 6765 x:8000..User-Age
0x0070: 6e74 3a20 4d6f 7a69 6c6c 612f 352e 3020 nt:.Mozilla/5.0.
型
但是nginx发送的请求似乎使用了不同的协议(是否有uwsgi协议?)。
0x0030: 220b a499 0073 0300 0c00 5155 4552 595f "....s....QUERY_
0x0040: 5354 5249 4e47 0000 0e00 5245 5155 4553 STRING....REQUES
0x0050: 545f 4d45 5448 4f44 0300 4745 540c 0043 T_METHOD..GET..C
0x0060: 4f4e 5445 4e54 5f54 5950 4500 000e 0043 ONTENT_TYPE....C
0x0070: 4f4e 5445 4e54 5f4c 454e 4754 4800 000b ONTENT_LENGTH...
型
我在nginx配置或uwsgi调用中犯了什么错误,导致uwsgi无法回复nginx的非HTTP请求?
1条答案
按热度按时间xam8gpfp1#
有两个独立的协议。
我需要用途:
字符串