I am trying to serve a Django application using Nginx and uWsgi
I followed
https://serverfault.com/questions/775965/wiring-uwsgi-to-work-with-django-and-nginx-on-ubuntu-16-04
for same.
platforms.ini file
[uwsgi]
project = platforms
base = /home/ubuntu
chdir = /home/ubuntu/platforms/
home = /home/ubuntu/.local/share/virtualenvs/platforms-hQBv-BwK/
module = platforms.wsgi:application
master = true
processes = 5
logger = file:/home/ubuntu/platforms/logs/uwsgi.log
socket = %(base)/%(project)/%(project).sock
chmod-socket = 666
uwsgi.service file
[Unit]
Description=uWSGI Emperor service
After=syslog.target
[Service]
ExecStart=/home/ubuntu/.pyenv/versions/3.7.6/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
NotifyAccess=all
[Install]
WantedBy=multi-user.target
vacuum = true
When I run the application using below command
uwsgi --http :8000 --home /home/ubuntu/.local/share/virtualenvs/platforms-hQBv-BwK --chdir /home/ubuntu/platforms -w platforms.wsgi
it works fine.
python manage.py runserver 0.0.0.0:8000
works fine
But when i run using ini file
I get
internal server error
also in the logs i am getting
--- no python application found, check your startup logs for errors ---
[pid: 6752|app: -1|req: -1/7] xx.xxx.xxx.xx () {44 vars in 904 bytes} [Wed Mar 11 07:12:50 2020] GET /admin/ => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
announcing my loyalty to the Emperor...
I am unable to figure out what could be issue. Please Help.