502 Bad Gateway in Digital Ocean Server
- Operating System: Ubuntu
- Web Server : Nginx
- Web Application : Nuxt.js
My client had problem with “502 Bad Gateway”
I wrote “tail -f /var/log/nginx/error.log” which result :
connect() failed (111: Connection refused while connecting to upstream, client: ***.***.***.***, Server: domainName.co.id, request: GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico"
How to fix this issue …. ?
I check the list of node JS process by wrote “pm2 list” that resulted no one process exist.
So i decided to enter the /var/www/domainName and wrote “pm2 start” then the process up and the website up too.