title: Connecting uwsgi with Nginx does not work
body: <h2>Solved</h2>
  
  <blockquote>
    <h3>see bottom for fixes etc.</h3>
  </blockquote>
  
  <p>I'm trying to connetc my django app with nginx via uwsgi, but it seems that the passing of data to uwsgi does not happen. I've tested that the uwsgi server is running properly and do not get any log output on either end.</p>
  
  <blockquote>
    <p>uwsgi.ini</p>
  </blockquote>
  
  <pre><code>[uwsgi]
  module = MyDjangoApp.wsgi:application
  master = True
  
  ;http-socket = :8001 #to run uwsgi on its one to ensure that it works
  
  socket = :8001
  
  vacuum = True
  max-requests = 5000
  plugin = python3
  enable-threads = True
  </code></pre>
  
  <blockquote>
    <p>/etc/nginx/sites-available file tree</p>
    
    <blockquote>
      <ul>
      <li>default</li>
      <li>serverDjango_nginx.conf</li>
      </ul>
    </blockquote>
    
    <p>serverDjango_nginx.conf:</p>
  </blockquote>
  
  <pre><code># the upstream component nginx needs to connect to
  upstream django {
      #server unix:///path/to/your/mysite/mysite.sock; # for a file socket
      server 127.0.0.1:8001; # for a web port socket (we'll use this first)
  }
  
  # configuration of the server
  server {
      # the port your site will be served on
      listen      8000;
      # the domain name it will serve for
      server_name 127.0.0.1; # substitute your machine's IP address or FQDN
      charset     utf-8;
  
      # max upload size
      client_max_body_size 75M;   # adjust to taste
  
      # Django media
     # location /media  {
  # location /media  {
     #     alias /path/to/your/mysite/media;  # your Django project's media files $
     # }
  
     # location /static {
     #     alias /path/to/your/mysite/static; # your Django project's static files$
     # }
  
      # Finally, send all non-media requests to the Django server.
      location / {
          uwsgi_pass  django;
          include     /home/pi/Server/uwsgi_params; # the uwsgi_params file you in$
      }
  </code></pre>
  
  <h1>UPDATE:</h1>
  
  <p>first the site wasn't enabled...
  second I've put a link to it in the /etc/nginx/sites-enabled/ as the documentation said
  now i get this wierd error:</p>
  
  <blockquote>
    <p>2020/03/29 12:14:18 [emerg] 4344#4344: open() "/etc/nginx/sites-enabled/serverDjango_nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:63</p>
  </blockquote>
  
  <p>I looked into the corresponding config file to find</p>
  
  <pre><code> include /etc/nginx/conf.d/*.conf;
   include /etc/nginx/sites-enabled/*;
  
  </code></pre>
  
  <p>and now I am wondering why id does not find the file I've linked to</p>
  
  <blockquote>
    <p>sudo ln -s ~/etc/nginx/sites-available/serverDjango_nginx.conf /etc/nginx/sites-enabled/</p>
  </blockquote>
  
  <h1>Update No2</h1>
  
  <p>so the linkagepath was wrong because of:</p>
  
  <blockquote>
    <p>sudo ln -s <strong><em>~</em></strong>/etc/nginx/sites-available/serverDjango_nginx.conf  </p>
  </blockquote>
  
  <p>the tilde there, which forced a relative path, therefore invalidating the link</p>