am getting a 502 bad getway nginx/1.10.3 (Ubuntu) on my php application on digital ocean droplet

I had my php application working fine, i think one day it upgraded itself and now my web application has an error. i have searched online for a possible solution. i have checked my error logs it says "connect() to unix:/var/run/php/php7.0-fpm.sock failed (2: No such file or directory) while connecting to upstream, ". i cant seem to locate the php7.0-fpm.sock but their is file. please help me. i have tried almost everything. i am new in the development world. any help will be appreciated. thank you in advance


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.

Help me anyone my site & all not open it. Showing 502 bad getway


It looks like that your PHP-FPM sock file is either missing or incorectly specified in your Nginx config. What I would suggest here is following the instructions here in Step 3 on how to configure PHP-FPM and Nginx:

Hope that this helps! Regards, Bobby