zoukankan      html  css  js  c++  java
  • 编写uwsgi.ini启动uwsgi

    安装django后的uwsgi可以在根目录设置:

    新建uwsgi.ini文件,并填写以下内容

    [uwsgi]
    
    #使用uwsgiweb访问连接时使用
    http=0.0.0.0:9000

    #使用nginx连接时使用 socket=0.0.0.0:8900 master=true #项目目录 chdir = /home/Report #项目目录名 wsgi-file = Report/wsgi.py # maximum number of worker processes processes=4 threads=2 daemonize: /tmp/uwsgi.log pidfile: /tmp/uwsgi.pid disable-logging : true vacuum = true # 设置自中断时间 harakiri = 300 # 设置缓冲 post-buffering = 6553600 http-timeout = 600
    # 设置虚拟环境的路径
    virtualenv=/django/python/env/
    #代码更新立马重载
    py-autoreload = 1


    然后执行

    uwsgi --ini uwsgi.ini
    后台运行:
    uwsgi -d --ini uwsgi.ini



    1.卸载uwsgi

    pip uninstall uwsgi

    #注意此时卸载,pip会有缓存留在系统里

    2.安装pcre支持库

    yum install pcre pcre-devel pcre-static

    3.继续安装uwsgi,不走pip缓存

    pip install uwsgi -I --no-cache-dir

     
  • 相关阅读:
    C# sqlhelp
    vs2015 C#打包程序为exe
    python3.6安装docx模块
    python 第八天
    python 第七天
    python 选课系统
    python 第六天
    python 模拟实现一个ATM + 购物商城程序
    python 计算器
    python 第五天
  • 原文地址:https://www.cnblogs.com/smilevv/p/14151256.html
Copyright © 2011-2022 走看看