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 MATLAB动图的问题
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名