Question

502 Bad Gateway nginx/1.10.0 (Ubuntu)

Hi,

I had some help setting up the servers for my site first time around. Everything was working great, I was pushing all changes to the site from github with no issues. I have letsencrypt working on the site.

We got this email from Digital Ocean: "We’ve had to reboot your Droplet as a result of an issue with the physical node that hosts your Droplet. We will continue to investigate the health of this physical node to determine if this was an isolated or systemic issue.

No action is required on your part at this time and we apologize for any troubles this may have caused."

Ever since I got this email the site has been down and everything I do can’t get it back up. It is a simple bootstrap site and the issues have to be in the server.

Has anyone dealt with this before and have a fix for it?

My server:

server { server_name example.com; return 301 $scheme://example.com$request_uri; }

server { listen 443 ssl;

server_name www.example.com example.com;

ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;


location / {
    proxy_pass http://localhost:3000;
    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;

  }

 location ~ /.well-known {
            allow all;
 }

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA25$
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_stapling on;
    ssl_stapling_verify on;
    add_header Strict-Transport-Security max-age=15768000;

}

server { listen 80; server_name example.com example.com; return 301 https://$host$request_uri; }

Digital Ocean sent me this link with some walk throughs to trouble shoot the server: https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-site-issues-on-a-linux-server

I went through these and wasn’t able to get it turned on.

Thank you!

Subscribe
Share

My lenovo k3note is not root


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

It seems this is for me because I have the issue too

This comment has been deleted

The issue seems to be on connecting to http://localhost:3000, check if the port is open and working.

wget http://localhost:3000

If you can’t connect to port 3000, neither can nginx.