'Error - pointing domain name to EC2 using NGINX to run ReactJS

I have some issues on the EC2 I have a react-node JS web app running on an EC2 instance. The app is running on http://44.200.69.97/ and everything is fine with it but the issue when I tried to point my domain name to it, it failed. The domain name is http://dev.censorit.net/

The http://dev.censorit.net/ should point to http://44.200.69.97/ but it's not.

When I specify the port it works, http://dev.censorit.net:3000/ points to http://44.200.69.97:3000

The domain not pointing to port 80 but points to any other port

I tried moving the build files into root /var/www/html; but didn't work. Then I tried reversed proxy and it didn't work as well.

I'm using NGINX and this is the conf file

upstream app_reactjs {
   server localhost:3000;
}

server {
   listen 80;
   listen [::]:80;

   server_name dev.censorit.net;

   location / {
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header Host $http_host;
     proxy_set_header X-NginX-Proxy true;
     proxy_pass http://app_reactjs;
     proxy_redirect off;
   }
}


Solution 1:[1]

I solved the issue by changing the hosting service to amazon and changed the DNS nameserver to amazon

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Abdulaziz Alghamdi