我在 aws EC2 上托管一个 django 项目,gunicorn.conf
文件中有以下内容:
[program:gunicorn]
Directory=/var/www/html/myapp
command=/usr/local/bin/gunicorn --workers 3 --bind
unix:/var/www/html/myapp/app.sock myproject.wsgi:application
autostart=true
autorestart=true
stderr_logfile=/var/log/gunicorn/gunicorn.err.log
stdout_logfile=/var/log/gunicorn.out.log
[group:guni]
programs:gunicorn
配置 gunicorn 后,我运行了命令sudo supervisorctl status
。我希望输出显示RUNNING
,但事实并非如此,而是我看到的是 guni:gunicorn STARTING
:
ubuntu@ip-172-31-17-212:/etc/supervisor/conf.d$ sudo supervisorctl status
guni:gunicorn STARTING
当我看到 gunicorn 没有运行时,我通过运行命令检查了错误日志,/var/log/gunicorn/gunicorn.err.log
输出是:gunicorn: error: argument -b/--bind: expected one argument
请问我该如何解决这个错误?