这是supervisord.conf文件 内容为:[program:mysite]command=uwsgi --http :8000 --chdir ~/mysite --module mysite.wsgidirectory=~/mysitestartsecs=0stopwaitsecs=0autostart=trueautorestart=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.wsgidirectory=/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.
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.
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