HanSonJ
V2EX  ›  问与答

使用 uwsgi + nginx 部署 django, nginx 的 location 应该如何配置?

  •  
  •   HanSonJ · Jan 24, 2016 · 1533 views
    This topic created in 3768 days ago, the information mentioned may be changed or developed.

    现在访问 domain:8000 是可以访问的,使用 80 却出现超时的情况

    location / {
            uwsgi_pass 127.0.0.1:8000;
            root  /home/path/project;
            include uwsgi_params;
    }
    

    运行 uwsgi 的语句是

    uwsgi --http :8000 --chdir /home/path/project--wsgi-file wsgi.py --processes 4

    求助一下是什么原因导致 nginx 似乎找不到 uwsgi ?

    1 replies    2016-01-24 16:03:45 +08:00
    HanSonJ
        1
    HanSonJ  
    OP
       Jan 24, 2016
    已解决,通过增加 ini 配置文件,然后修改了 wsgi-file 文件的路径,估计是之前这个文件路径写错了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 20:01 · PVG 04:01 · LAX 13:01 · JFK 16:01
    ♥ Do have faith in what you're doing.