通过uwsgi部署django项目,需要uwsgi.ini配置文件,配置内容如下
[uwsgi] # 不可缺少的重要部分,没有这个就无法识别
http = :8087 # 开启的端口
chdir = /software/soft/bigWhite # 项目的跟目录位置
socket = 127.0.0.1:8086 # 建立内部通信地址与nginx通信
static-safe = /software/soft/bigWhite
wsgi-file = bigWhite/wsgi.py
master = True
processes = 4
threads = 2
pidfile = /software/soft/bigWhite/uwsgi.pid
home = /software/weeksday/weeks # 指定python的根目录
PYTHONEHOME = /software/weeksday/week/bin # 指定python项目的环境,到bin目录