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

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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