I'm trying to deploy my first django project, i'm using uwsgi and nginx on a linode server. Basically I follow the next steps.
Create uwsgi config file for my project on /etc/uwsgi/apps-available/, and create the symbolic link on /etc/uwsgi/apps-enabled/:
[uwsgi] plugins = http,python env = DJANGO_SETTINGS_MODULE=app.settings chdir = /opt/deploy/.virtualenvs/test_app/test/ home = /opt/deploy/.virtualenvs/test_app/ module = django.core.handlers.wsgi:WSGIHandler() processes = 4 idle = 3600 touch-reload = /opt/deploy/.virtualenvs/test_app/test/app/local_settings.pyCreate my nginx config file on /etc/nginx/sites-available/ and create the symbolic link in cd nginx/sites-enabled/, this is my nginx file:
server { server_name www.test.com; rewrite ^(.*) http://test.com$1 permanent; } server { listen 80; server_name test.com; charset utf-8; client_max_body_size 10m; client_body_buffer_size 128k; # serve static files location /static/ { alias /opt/deploy/.virtualenvs/test_app/test/app/static/; } location / { include uwsgi_params; uwsgi_pass unix:/run/uwsgi/app/test.sock; } }Restart uwsgi and nginx.
I expect find the file test.sock on run/uwsgi/app/, but the file is not created. When a see the nignx error log I have this line:
2015/10/02 01:47:49 [crit] 8967#0: *51 connect() to unix:/run/uwsgi/app/test.sock failed (2: No such file or directory) while connecting to upstream, client: 181.135.143.435, server: test.com, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:/run/uwsgi/app/test.sock:", host: "test.com"
Why can i do for generate the uwsgi file?, thankyou so much I know that could be a stupid question but before to do this write a look for a lot of tutorials and can't find any solution.. thank you.