大约一周前,我在ubuntu实例上使用nginx,gunicorn和超级用户部署了django项目,一切顺利,直到今天我遵循相同的步骤上传修改后的项目,但似乎无济于事
我有几个问题要问,当您键入sudo service nginx restart时,将sock文件分解会正常吗?以前没有发生过。进行更改后和重新启动时,sock文件丢失了。
为什么supervisorctl状态只说“开始”。我以前经常看到“正在运行”以及时间。
请帮助,我为此浪费了很多时间。我迫切需要一些指导
gunicorn.conf residing in etc/supervisor/conf.d
[program:gunicorn]
directory=/home/ubuntu/untitled2/cpanel
command=/home/ubuntu/env/bin/gunicorn --workers 3 --bind unix:/home/ubuntu/untitled2/cpanel/app.sock cpanel.wsgi:app$
autostart=true
autorestart=true
stderr_logfile=/var/log/gunicorn/gunicorn.err.log
stdout_logfile=/var/log/gunicorn/gunicorn.out.log
[group:guni]
programs:gunicorn
django.conf residing in /etc/nginx/sites-available
server {
listen 80;
server_name www.rabcdere.com;
location /static/ {
# root /var/www/app/static/;
alias /var/www/static/;
autoindex off;
}
location / {
include proxy_params;
proxy_pass http://unix:home/ubuntu/untitled2/cpanel/app.sock;
}
}
gunicorn error log says
SyntaxError: unexpected EOF while parsing
[2019-04-26 11:22:07 +0000] [424] [INFO] Worker exiting (pid: 424)
[2019-04-26 11:22:07 +0000] [426] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn /arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/ubuntu/env/lib/python3.5/site-packages/gunicorn/util.py", line 362, in import_app
app = eval(obj, vars(mod))
File "<string>", line 1
app$
^
SyntaxError: unexpected EOF while parsing