Question
how can I resolve "502 Bad Gateway nginx/1.14.0 (Ubuntu)" ?
Hi. I’m the new one want to use DigitalOcean and I must admit I don’t have many knowledge of server
I wanted to make blog with Ghost… but even I couldn’t see basic theme of Ghost
when I write on domain of web, I have got this error message
502 Bad Gateway
nginx/1.14.0 (Ubuntu)
I’m gonna let you know my progress
I created droplet and my ssh key. and I spent hard time because, permission of my public key was denied. but finally I solved this problem.
and console requested me my blog url. so I wrote my custom domain that connected my droplet ip address.
and I requested my ip address website. but I have got error.
I found some information so I could see my error.log file
this is my error.log file
2019/10/30 15:56:01 [error] 3570#3570: *1 connect() failed (111: Connection refused) while connecting to upstream, client: [SNIP - IP ADDRESS], server: woosik.me, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:2368/favicon.ico", host: "[SNIP - IP ADDRESS]", referrer: "http://[SNIP - IP ADDRESS]/"
please fix this problem T.T
and if you need to get more information, write comment please :) thx.
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.
×
This could be many reasons but the main it is looking like NGINX cannot communicate with your application back-end. You will need to ensure the service is running and able to be reached.
A good start is this article: https://www.datadoghq.com/blog/nginx-502-bad-gateway-errors-php-fpm/