python - supervisor 出错?

查看:79
本文介绍了python - supervisor 出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题


这是supervisord.conf文件 内容为:
[program:mysite]
command=uwsgi --http :8000 --chdir ~/mysite --module mysite.wsgi
directory=~/mysite
startsecs=0
stopwaitsecs=0
autostart=true
autorestart=true

但ip地址加8000端口访问不了网页

而单独用uwsgi命令就可以成功部署并访问
新手求解答

解决方案

supervisor 是不扩展~的
directory=~/mysite 是不会扩展到 /home/user/mysite的
文档只写%(here)s能扩展,与此同时将directory写到mysite的绝对路径后,默认已有切换到mysite,
command=uwsgi --http :8000 --chdir ~/mysite --module mysite.wsgi 就不用写 --chdir ~/mysite了
总结
command=uwsgi --http :8000 --module mysite.wsgi
directory=/home/XXX/mysite

directory

When supervisord daemonizes, switch to this directory. This option can include the value %(here)s, which expands to the directory in

which the supervisord configuration file was found.

这篇关于python - supervisor 出错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆