Почему после добавления "'social_django'," в разделе INSTALLED_APPS файла settings.py я столкнулся с ошибкой "An error occured"?

Я пытаюсь реализовать oauth с помощью входа в Twitter.

Я заметил, что я получаю ошибку обратно, если добавляю эту строку в раздел INSTALLED_APPS в settings.py

'social_django',

Почему я получаю эту ошибку на nginx?

страница ошибкиnginx

An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

settings.py

...
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'blog',
    'user_auth',
    'social_django',
]
...

Мой проект работает нормально без этого

'social_django',

/var/log/nginx/error.log

2022/07/13 17:39:29 [error] 1034#1034: *46 connect() failed (111: Connection refused) while connecting to upstream, client: ***.***.***.***, server: ***.***.***.***, request: "GET /post-1/ HTTP/1.1", upstream: "http://127.0.0.1:8000/post-1/", host: "***.***.***.***", referrer: "http://***.***.***.***"

/etc/nginx/conf.d/default.conf

server {
    listen       80;
    server_name  ***.***.***.*** foo.com;

    #access_log  /var/log/nginx/host.access.log  main;

    location /static {
        alias /usr/share/nginx/html/static;
    }

    location /media {
        alias /usr/share/nginx/html/media;
    }







    location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Forwarded-Proto $scheme;
    }




location /phpMyAdmin {
    root /usr/share/;
    index index.php index.html index.htm;
    
          
    location ~ ^/phpMyAdmin/(.+\.php)$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    location ~* ^/phpMyAdmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
        root /usr/share/;
    }

}





    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
Вернуться на верх