title: ALLOWED_HOSTS error in Django app on Digital Ocean. Setting the variable does not resolve the error
body: <p>I followed this guide to set up a Django app on DO:</p>
  
  <p><a href="https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04" rel="nofollow noreferrer">https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04</a></p>
  
  <p>However, I'm unable to get past the common ALLOWED_HOSTS error, where everyone typically forgets to put anything in the list and its a simple fix.  Even with the correct values entered, or with the catch-all "*", the error persists.  I've never had this happen before, so I'll put my configuration files here to get some more eyes on it.  Any ideas as to what could be causing this?</p>
  
  <p>contents of /etc/uwsgi/sites/myapp.ini:</p>
  
  <pre><code>[uwsgi]
  project = myapp
  uid = myuser
  base = /home/%(uid)
  
  chdir = %(base)/%(project)
  home = %(base)/%(project)/venv
  module = %(project).wsgi:application
  
  master = true
  processes = 5
  
  socket = /run/uwsgi/%(project).sock
  chown-socket = %(uid):www-data
  chmod-socket = 660
  vacuum = true
  </code></pre>
  
  <p>contents of /etc/systemd/system/uwsgi.service:</p>
  
  <pre><code>[Unit]
  Description=uWSGI Emperor service
  
  [Service]
  ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown myuser:www-data /run/uwsgi'
  ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
  Restart=always
  KillSignal=SIGQUIT
  Type=notify
  NotifyAccess=all
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>contents of /etc/nginx/sites-available/myapp:</p>
  
  <pre><code>server {
      listen 80;
      server_name mydomain.com www.mydomain.com;
  
      location = /favicon.ico { access_log off; log_not_found off; }
      location /static/ {
          root /home/myuser/myapp_static;
      }
  
      location / {
          include         uwsgi_params;
          uwsgi_pass      unix:/run/uwsgi/myapp.sock;
      }
  }
  </code></pre>
  
  <p>UPDATE</p>
  
  <p>error message displaying in browser:</p>
  
  <pre><code>DisallowedHost at /
  Invalid HTTP_HOST header: 'mydomain.com'. You may need to add 'mydomain.com' to ALLOWED_HOSTS.
  Request Method: GET
  Request URL:    mydomain.com
  Django Version: 1.11
  Exception Type: DisallowedHost
  Exception Value:    
  Invalid HTTP_HOST header: 'mydomain.com'. You may need to add 'mydomain.com' to ALLOWED_HOSTS.
  Exception Location: /home/myuser/myapp/venv/lib/python3.5/site-packages/django/http/request.py in get_host, line 113
  Python Executable:  /usr/local/bin/uwsgi
  Python Version: 3.5.2
  Python Path:    
  ['.',
   '',
   '/usr/lib/python35.zip',
   '/usr/lib/python3.5',
   '/usr/lib/python3.5/plat-x86_64-linux-gnu',
   '/usr/lib/python3.5/lib-dynload',
   '/home/myuser/myapp/venv/lib/python3.5/site-packages']
  </code></pre>
  
  <p>Oh, well now this is interesting.  According to the django error page, the current value of ALLOWED_HOSTS is my server's ip address (in a list of course).  But its definitely set to ['*'] right now in the settings.py file.  What could possibly be overriding that variable?</p>