I tried setting django on top to nginx and uwsgi, and when trying to access localhost
a bad gateway 502 error occurs,
This is the file / etc / ngingx / sites -available / default
server { server_name testapp1.com www.testapp1.com; access_log /var/log/nginx/testapp1.com.access.log; location / { uwsgi_pass unix:///var/run/uwsgi/app/testapp1/socket; include uwsgi_params; } }
This is my testapp1.ini file in / etc / nginx / apps -available /
[uwsgi] thread=3 master=1 env = DJANGO_SETTINGS_MODULE=testapp1.settings module = django.core.handlers.wsgi:WSGIHandler() chdir = /home/paul/apps/testapp1 socket = /run/uwsgi/testapp1/socket logto = /var/log/uwsgi/testapp1.log
This is the uwsgi.log file
Tue July 10 21:49:38 2012 - *** Launch uWSGI 1.0.3-debian (32bit) on
[Tue Jul 10 21:49:38 2012] *** Tue Jul 10 21:49:38 2012 - compiled
with version: 4.6.2 dated February 20, 2012 10:06:16 Tue Jul 10 21:49:38
2012 - current working directory: / Tue July 10 21:49:38 2012 - writing
pidfile to / run / uwsgi / app / testapp1 / pid Tue Jul 10 21:49:38 pm 2012 -
detected binary path: / usr / bin / uwsgi-core Tue Jul 10 21:49:38 2012 -
setgid () until 33 W Jul 10 21:49:38 2012 - setuid () until 33 W Jul 10
21:49:38 2012 - your memory page size is 4096 bytes Tue July 10
21:49:38 2012 - uwsgi socket 0 is bound to a UNIX address
/ run / uwsgi / app / testapp1 / socket fd 5 W Jul 10 Jul 21:49:38 2012 - bind ():
There is no such file or directory [socket.c line 107]
I have not changed the nginx.conf file.
Paul thomas
source share