title: NGINX configuration help needed. IP address works. Domain name displays NGINX default configuration
body: <p>I have an issue which has been driving me insane all weekend. I have deployed my Django Rest Framework API using Ubuntu / NGINX / gunicorn. The API works and can be seen when you visit the IP (<a href="http://213.219.38.17/" rel="nofollow noreferrer">http://213.219.38.17/</a>). However, when I visit the site using my purchase domain (<a href="http://www.conorbaileyapi.xyz" rel="nofollow noreferrer">www.conorbaileyapi.xyz</a>) the NGINX default page is displayed.</p>
  <p>I purchased the domain 'conorbaileyapi.xyz' from Namecheap and added the correct name server records and added the A Records to the Linode server.</p>
  <p>My Allowed hosts list in my Django project is as follows:</p>
  <pre><code>ALLOWED_HOSTS = ['213.219.38.17', 'conorbaileyapi.xyz', 'www.conorbaileyapi.xyz']
  </code></pre>
  <p>My NGINX server block is as follows:</p>
  <pre><code>server {
      listen 80;
      server_name conorbaileyapi.xyz www.conorbaileyapi.xyz 213.219.38.17;
  
      location = /favicon.ico { access_log off; log_not_found off; }
      location /static/ {
          root /home/conor/api/django-rest-api/blog;
      }
  
      location / {
          include proxy_params;
          proxy_pass http://unix:/home/conor/api/django-rest-api/blog/blog.sock;
      }
  }
  </code></pre>
  <p>Thanks you in advance for you help.</p>
  <p>Conor</p>