title: Cannot locate a static file. I get an error that 'STATIC_ROOT' is not set
body: <h2>What I want to do</h2>
  
  <p>I'm trying to deploy my Django app using AWS (EC2), nginx, and gunicorn. The current goal is to place the static files in the directory /usr/share/nginx/html/static.</p>
  
  <h2>Problem that is occurring</h2>
  
  <p>I created /usr/share/nginx/html/static and then ran  <code>python manage.py collectstatic</code> command.</p>
  
  <p>I had set STATIC_ROOT in settings.py to STATIC_ROOT='/usr/share/nginx/html/static' before, so I thought I could use the collectstatic command to collect static files from within the Django project and place them in /usr/share/nginx/html/static. However, that wasn't the case. Instead I got an error saying <code>django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.</code> Could you please explain why this is so?</p>
  
  <p>I have tried some suggested solutions over the internet but the problem still exists. I’d be really appreciated if you could reply to me.</p>
  
  <p><a href="https://i.stack.imgur.com/9Ymoj.png" rel="nofollow noreferrer">error message</a></p>
  
  <p><a href="https://i.stack.imgur.com/Vp36M.png" rel="nofollow noreferrer">'STATIC_ROOT'</a></p>