Home  >  Q&A  >  body text

python - uwsgi --socket :8000 --wsgi-file test.py 无法访问?

黄舟黄舟2647 days ago198

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 16:24:56

    能访问就怪了 你的浏览器是说http的而不是直接说uwsgi的,

    最简单的方法,让uwsgi直接说http

    uwsgi --http :8000 --wsgi-file test.py

    或者,在部署中,让nginx说uwsgi(nginx原生支持:http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html),在用浏览器和nginx说http

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:24:56

    我也遇到了这个问题,
    如果你是按照http://uwsgi-docs.readthedocs...这个教程来的。
    那么记得重启下nginx

    sudo service nginx restart

    然后再执行你那条命令

    reply
    0
  • Cancelreply