请帮助我有关nginx + uwsgi + django

时间:2019-03-19 04:53:56

标签: django ubuntu nginx uwsgi

我在云服务器ubuntu系统上部署了一个django项目,但是没有运行,我觉得哪里有错误,有时该页面会出现502错误的网关,请帮我找到。 这是home / sscc / sscc2019 / uwsgi.ini

[uwsgi]
socket=127.0.0.1:8000
chdir=/home/sscc/sscc2019
wsgi-file=/home/sscc/sscc2019/wsgi.py
enable-threads=true
thunder-lock=true
post-buffering=4096
processes=4
threads=2
master=true
pidfile=/home/sscc/sscc2019/uwsgi.pid
daemonize=/home/sscc/sscc2019/uswgi.log
module=sscc2019.wsgi:application
vacuum=true
chmod-socket=666
#virtualenv=/root/.virtualenvs/ssccenv
harakiri=60
max-requests=5000
uid=1000
gid=2000
#plugin=python3

这是/home/sscc/sscc2019/uwsgi.log:

*** Starting uWSGI 2.0.18 (64bit) on [Tue Mar 19 12:35:02 2019] ***
compiled with version: 5.4.0 20160609 on 19 March 2019 03:25:55
os: Linux-4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019
nodename: localhost
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/sscc/sscc2019
writing pidfile to /home/sscc/sscc2019/uwsgi.pid
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
setgid() to 2000
setuid() to 1000
chdir() to /home/sscc/sscc2019
your processes number limit is 15655
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: enabled
probably another instance of uWSGI is running on the same address (127.0.0.1:8000).
bind(): Address already in use [core/socket.c line 769]

这是/etc/nginx/sites-availables/sscc2019.conf:

server{
    listen  80;
    listen:this-is-my-IP:80;
    charset utf-8;
    server_name ssccracing.com;  
    client_max_body_size 75M;
        location / {
                include uwsgi_params;
        uwsgi_bind this-is-my-IP;
        uwsgi_connect_timeout 60; 
                uwsgi_pass 127.0.0.1:8000; 
        }
        location /static {
                alias /var/www/sscc2019/static;
        }
}

这是var / nginx / error.log:

2019/03/19 12:59:26 [notice] 4320#4320: signal process started

0 个答案:

没有答案