nginx애러

nginx를 실행하면 다음과 같은 오류가 발생하는 데 이를 어떻게 해결해야 하나요?
(mysite) ubuntu@aluxlaw:/etc/nginx/sites-enabled$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful but outcome is 502 bad gateway..
달리 LightSale을 사용할 수 있는 방법이 없나요? Nginx부분(또는 gunicorm의 mysite.services부분에서도 copy&paste를 했는데도 계속 애러 발생)에서 계속 애러가 발생하여서요...

hscoding 370

2023년 1월 25일 5:43 오후

작성하신 nginx의 mysite 파일과 mysite.services 파일을 보여주세요. - 박응용님, 2023년 1월 25일 7:00 오후 추천 , 대댓글
목록으로
1개의 답변이 있습니다. 1 / 1 Page

요청하신 nginx의 mysite파일과 mysite.services파일은 다음과 같습니다.
책 그대로 복사하여 넣었습니다. 지도바랍니다.

mysite.service is as follows: [Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/projects/mysite
EnvironmentFile=/home/ubuntu/venvs/mysite.env
ExecStart=/home/ubuntu/venvs/mysite/bin/gunicorn \
--workers 2 \
--bind unix:/tmp/gunicorn.sock \
config.wsgi:application

[Install]
WantedBy=multi-user.target

server {
listen 80;
server_name 43.200.123.75;

    location = /favicon.ico { access_log off; log_not_found off; }

    location /static {
            alias /home/ubuntu/projects/mysite/static;
    }

    location / {
            include proxy_params;
            proxy_pass http://unix:/tmp/gunicorn.sock;
    }

}

hscoding

2023년 1월 26일 11:23 오전