python - django+nginx+uwsgi部署时,执行supervisorctl启动的时候报错(新手)
PHPz
PHPz 2017-04-18 09:42:45
0
1
368

p.s: 项目放在了/home/alps/mysite下面,部署环境是ubuntu16.04

这是报错信息

$ sudo supervisorctl -c /etc/supervisord.conf restart all
mysite: ERROR (no such file)

配置文件/etc/supervisord.conf如下

[program:mysite]
command=uwsgi --ini /home/alps/mysite/uwsgi.ini
directory=/home/alps/mysite
startsecs=0
stopwaitsecs=0
autostart=true
autorestart=true

配置文件/home/alps/mysite/uwsgi.ini如下

/home/alps/uwsgaa[uwsgi]
socket = /tmp/mysite.sock
chdir=/home/alps/mysite/
wsgi-file = mysite/wsgi.py
touch-reload=/home/alps/myiste/reload

processes = 2
threads = 4

chmod-socket = 664
chown-socket=alps:www-data

执行下面两条命令的时候都正常,没有报错信息。

$ uwsgi --http :8001 --chdir /home/alps/mysite --module mysite.wsgi
$ supervisord -c /etc/supervisord.conf

新手第一次学习django部署,希望高手多多指教。

PHPz
PHPz

学习是最好的投资!

membalas semua(1)
迷茫

Bolehkah anda menyiarkan konfigurasi lengkap supervisord.conf anda? Berdasarkan konfigurasi semasa anda, terdapat bahagian yang tiada tentang konfigurasi pelayan penyelia dan penyelia.

Saya akan siarkan perenggan untuk anda sebagai rujukan:

[unix_http_server]
file = /opt/test/run/supervisord.sock

[rpcinterface:supervisor]
; This section is always necessary because supervisor uses RPC internally.
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
; Must match settings in 'unix_http_server'
serverurl = unix:////opt/test/run/supervisord.sock
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan