1

I am following this link to https://www.linode.com/docs/websites/nginx/deploy-django-applications-using-uwsgi-and-nginx-on-ubuntu-14-04 to host django application on nginx server. I followed all steps mention in link but it show error while browsing site :502 Bad gateway. I checked nginx error log file, it displays below error:

2017/03/04 07:09:21 [crit] 5131#0: *1 connect() to unix:/pathToMyProjectFolder/sample.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/pathToMyProjectFolder/sample.sock:", host: "localhost:8087"

And sample.sock file is not actually present in my project folder. I don't understand how this file will get created.

T-Heron
  • 5,385
  • 7
  • 26
  • 52
Arti Berde
  • 1,182
  • 1
  • 11
  • 23
  • 1
    Check in the uwsgi log at /var/log/uwsgi.log – Mohammad Mustaqeem Mar 04 '17 at 04:28
  • uwsgi.log displays nodename: ubuntu machine: x86_64 clock source: unix detected number of CPU cores: 1 current working directory: / detected binary path: /usr/local/bin/uwsgi !!! no internal routing support, rebuild with pcre support !!! user django not found. – Arti Berde Mar 04 '17 at 04:32
  • I think, this is self explanatory. Check [here](http://stackoverflow.com/questions/21669354/rebuild-uwsgi-with-pcre-support) – Mohammad Mustaqeem Mar 04 '17 at 04:35
  • I tried http://stackoverflow.com/questions/21669354/rebuild-uwsgi-with-pcre-support link but it still gave me same error – Arti Berde Mar 04 '17 at 07:18

0 Answers0