React Production Enivorement issue

July 22, 2019 133 views
Nginx Ubuntu 16.04

Hi,
Since re-installing one of my Droplets I ran against a problem, nginx is running perfectly fine aswell as React. When I'm trying to reach the website I receive:
'Host Not Found DNS error (the host name of the page you are looking for does not exist) or Server did not accept the connection. Please check that the host name has been spelled correctly.'

React is running on port 3000

My sites-available configuration:

upstream node-env {
  server localhost:3000;
  keepalive 64;
}
server {
 listen 80 default_server;
 listen [::]:80 ipv6only=on;

 root project_root;
location / {
 proxy_pass http://node-env/;
 proxy_http_version 1.1;
 proxy_read_timeout 240s;
 proxy_redirect off;
 proxy_set_header X-NginX-Proxy true;
 proxy_set_header Upgrade $http_upgrade;
 proxy_set_header Connection 'upgrade';
 proxy_max_temp_file_size 0;
 proxy_cache_bypass $http_upgrade;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded-_for;
}

}

My UFW status

Nginx HTTP ALLOW Anywhere
OpenSSH ALLOW Anywhere
Nginx Full ALLOW Anywhere
Nginx HTTP (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)

Any clues what could cause this?

1 Answer

That error have nothing to do with the server setup. The host name does not exist (typo). Make sure the hostname you type into the browser or wherever you set it is correct. How did you reinstall the Droplet? If you destroyed it and created a new the IP address changed, but that would result in a connection timeout and not a DNS resolution error.

Have another answer? Share your knowledge.