Report this

What is the reason for this report?

Can't get my basic page to load

Posted on April 11, 2017

I have come to a complete dead end on getting my app to run.

I was trying to use the following instructions:

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

I have tried two different apps in my droplet. The first one was a react app, so I was using ‘npm start’. Then, I put a more simple html app in, so ‘node app’ was sufficient.

In both cases, I was able to get my apps to work on localhost. “npm start”, “node app”, and then also things such as “pm2 start app” and “pm2 start npm – start” all worked. So, my app was spun up.

Also, my nginx appears to have at least started. When I goto <ip address>:<port number> or <domain name>.com from a browser on my machine, I get that standard “welcome to NGINX screen”.

When I ran the script “sudo nginx -t”, it said everything was fine.

I also allowed with “sudo ufw allow ‘Nginx Full’”."

my /etc/nginx/sites-available/default reads like:

server { listen 80;

server_name <domain name>.com;

location / {
    proxy_pass http://localhost:<port>;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

}

I have been through the instructions so many times, and I can’t see how I have not followed them to a ‘t’. Any suggestions on why I can’t see my page?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.