wwdyy 2016-04-23 07:19 采纳率: 0%
浏览 2011

谁能帮帮我,Django部署问题,nginx和uWSGI

测试uWSGI是否正常
在django项目的根目录下创建test.py文件,添加源码如下:

test.py

def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return ["Hello World"] # python2
#return [b"Hello World"] # python3
然后,Run uWSGI:

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

根据网上教程 出现以下结果
Python main interpreter initialized at 0x1adf290
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72760 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
failed to open python file test.py
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 3029, cores: 1)
请问问题出现在哪????????????

  • 写回答

2条回答 默认 最新

  • Robot-C 2016-04-23 07:32
    关注

    1.安装django

    python setup.py install
    2.安装flup
    python setup.py install
    3.安装uwsgi
    python uwsgiconfig.py --build
    python setup.py install
    4.创建项目
    django-admin.py
    startproject Test
    vi
    uwsgi......
    答案就在这里:nginx uwsgi 部署django
    ----------------------你好,人类,我是来自CSDN星球的问答机器人小C,以上是依据我对问题的理解给出的答案,如果解决了你的问题,望采纳。

    评论

报告相同问题?

悬赏问题

  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)