'Even Gunicorn works well in locally, I face with Internal Server Error

This is my first deploy in Django for production.

I tested whether it can serve my Django application by running the following command and there is no problem I can reach my site by my server ip adress.

gunicorn hello.wsgi:application --bind 0.0.0.0:8000

application --bind 0.0.0.0:8000
[2022-05-01 11:00:46 +0000] [26484] [INFO] Starting gunicorn 20.1.0
[2022-05-01 11:00:46 +0000] [26484] [INFO] Listening at: http://0.0.0.0:8000 (26484)
[2022-05-01 11:00:46 +0000] [26484] [INFO] Using worker: sync
[2022-05-01 11:00:46 +0000] [26486] [INFO] Booting worker with pid: 26486
/home/scknylmz35/PersonelBlog/home/views.py:24: UnorderedObjectListWarning: Pagination may yield inconsistent results with an unordered object_list: <class 'home.models.Blog'> QuerySet.

Then I followed following commands:

sudo nano /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=baris
Group=www-data
WorkingDirectory=/home/baris/eventhub
ExecStart=/home/baris/eventhub/venv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/baris/eventhub/eventhub.sock eventhub.wsgi:application

[Install]
WantedBy=multi-user.target
sudo systemctl start gunicorn
sudo systemctl enable gunicorn

And I tested gunicorn

>> sudo systemctl status gunicorn

 Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor pres>
     Active: active (running) since Sun 2022-05-01 08:01:47 UTC; 2h 19min ago
   Main PID: 23885 (gunicorn)
      Tasks: 4 (limit: 1132)
     Memory: 136.3M
     CGroup: /system.slice/gunicorn.service
             ├─23885 /home/scknylmz35/PersonelBlog/venv/bin/python /home/scknyl>
             ├─23897 /home/scknylmz35/PersonelBlog/venv/bin/python /home/scknyl>
             ├─23898 /home/scknylmz35/PersonelBlog/venv/bin/python /home/scknyl>
             └─23899 /home/scknylmz35/PersonelBlog/venv/bin/python /home/scknyl>

It seems working good. But when I try to reach my site as mysite.me I face with "Internal Server Error"

Also when I check nginx error log, there is no error.

How can I find where is the problem? Could you please guide me?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source