Uwsgi+djnago
1.安装uwsgi
pip install uwsgi
2.配置uwsgi
mkdir /etc/uwsgi/
mkdir /var/log/uwsgi/
sudo vim /etc/uwsgi/uwsgi.ini
[uwsgi]
chdir = /home/mike/productionsystembackup/
module = productionsystembackup.wsgi
env DJANGO_SETTINGS_MODULE=server.settings
pidfile = /tmp/uwsgi.pid
master = true
processes = 4
http = 0.0.0.0:8090
max-requests = 100
static-map = /static=/home/mike/productionsystembackup/collectedstatic
vacuum = true
buffer-size = 65536
daemonize =/var/log/uwsgi/uwsgi.log
3.启动停止重载
uwsgi --ini uwsgi.ini 启动
uwsgi --reload uwsgi.pid 重载
| uwsgi –stop uwsgi.pid 停止 |
sudo kill -9 进程号
4.查看log
cat /var/log/uwsgi/uwsgi.log