title: nginx fails successfully start with error pread() "/etc/nginx/sites-enabled/sites-available" failed (21: Is a directory)
body: <p>I have a simple django website im trying to load with nginx and uwsgi .</p>
  
  <p>When i try to test my nginx configuration i get the following:</p>
  
  <pre><code>$ sudo nginx -t
  nginx: [crit] pread() "/etc/nginx/sites-enabled/sites-available" failed (21: Is a directory)
  nginx: configuration file /etc/nginx/nginx.conf test failed
  </code></pre>
  
  <p>my sites-available/default config looks like:</p>
  
  <pre><code># the upstream component nginx needs to connect to
  upstream django {
      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      80;
      # the domain name it will serve for
      server_name website.com xx.xx.x.x; # substitute your machine's IP address or FQDN
      charset     utf-8;
  
      # max upload size
      client_max_body_size 2M;   # adjust to taste
  
      # Django media
      #location /media  {
      #    alias ;  # your Django project's media files - amend as required
      #}
  
      location /static {
          alias /static; # your Django project's static files - amend as required
      }
  
      # Finally, send all non-media requests to the Django server.
      location / {
          uwsgi_pass  127.0.0.1:8001;
          include     uwsgi_params; # the uwsgi_params file you installed
      }
  }
  </code></pre>
  
  <p>I viewed nginx error logs in <code>/var/log/nginx/error.log</code> and found:</p>
  
  <pre><code>2019/11/26 14:29:53 [crit] 7702#7702: pread() "/etc/nginx/sites-enabled/sites-available" failed (21: Is a directory)
  2019/11/26 15:05:25 [crit] 7736#7736: pread() "/etc/nginx/sites-enabled/sites-available" failed (21: Is a directory)
  </code></pre>
  
  <p>I also verified a symlink has been made between nginx's <code>sites-available/</code> and <code>sites-enabled</code>:</p>
  
  <pre><code>$ sudo ln -s /etc/nginx/sites-available/ /etc/nginx/sites-enabled/
  ln: failed to create symbolic link '/etc/nginx/sites-enabled/sites-available': File exists
  </code></pre>
  
  <p>what could be  going wrong here?</p>
  
  <p>Thanks</p>