我已经使用gunicorn和nginx部署了Django。django项目位于一个虚拟环境中。我跑的时候一切都很好-
gunicorn mydjangoproject.wsgi -c gunicorn_config.py
我在Django项目文件夹中运行上面的命令管理.py虚拟环境处于活动状态。在
但是现在我想关闭服务器终端,并希望gunicorn自动运行。为此,我请了主管。我用apt-get安装了supervisor并创建了一个古尼康.conf在主管确认文件中存档
但当我运行supervisorctl start gunicorn时,我遇到了一个致命错误-
gunicorn:错误(异常终止)
所以检查了日志文件,上面写着-
s管理员:无法't exec root/ervirtualVPY2/bin/gunicorn:ENOENT
未生成子进程
主管的配置文件古尼康.conf看起来像这样-
[program:gunicorn]
command = root/ervirtualenvpy2/bin/gunicorn myproject.wsgi -c root/path/to/the/gunicorn_conf.py/file
directory = root/ervirtualenvpy2/path/to/myproject/
user=root
autorestart=true
按照您所说的和您的配置,除了您指定了相对路径而不是绝对路径之外,一切似乎都是正确的:
见gunicorndocs
相反,它应该是:
相关问题 更多 >
编程相关推荐