nginx 잘못된 게이트웨이 오류가 있는 uWSGI

nginx 잘못된 게이트웨이 오류가 있는 uWSGI

그래서 nginx와 uwsgi를 사용하여 django 앱을 호스팅하려고 하는데 502 잘못된 게이트웨이 오류가 계속 발생합니다. 다음 nginx 구성이 있습니다.

    upstream django {
    server unix:///home/david/fimetsu_2/fimetsu-django/fimetsu.sock;
}
server {
    listen      80;
    server_name fimetsu.com www.fimetsu.com;
    charset     utf-8;
    client_max_body_size 75M;
    location /media  {
        alias /home/david/fimetsu_2/fimetsu-django/media;
    }
    location /static {
        alias /home/david/fimetsu_2/fimetsu-django/theme/static;
    }
    location / {
        uwsgi_pass  django;
        include     /home/david/fimetsu_2/fimetsu-django/uwsgi_params;
    }
}

다음 uWSGI 명령을 사용하여 웹 사이트를 제공합니다 uwsgi --socket fimetsu.sock --module fimetsu.wsgi --chmod-socket=664(666 권한도 시도함). 이것은 내 uwsgi 로그입니다.

** Starting uWSGI 2.0.20 (64bit) on [Sun Jan 28 11:39:00 2024] ***
compiled with version: 11.4.0 on 27 January 2024 17:23:25
os: Linux-5.15.0-1030-aws #34-Ubuntu SMP Mon Jan 23 20:13:32 UTC 2023
nodename: ip-172-26-14-147
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /home/david/fimetsu_2/fimetsu-django
detected binary path: /home/david/fimetsu_2/venv/bin/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 7837
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address fimetsu.sock fd 3
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x55a24e5cc020
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72920 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x55a24e5cc020 pid: 1074682 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 1074682, cores: 1)

그래서 내가 갈 때www.fimetsu.com:8000/home다 괜찮은데 내가 갈 때www.fimetsu.com/home502 잘못된 게이트웨이 오류가 발생합니다. 모든 분들의 아이디어와 도움을 기대합니다!

관련 정보