Question

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

Posted November 15, 2018 1.1k views
PHPDebian

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 php7.0-fpm.pid 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

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.

×
1 answer

Hello,

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:

https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04

Hope that this helps!
Regards,
Bobby

by Justin Ellingwood
by Mark Drake
This tutorial details the process for installing and configuring the components that constitute a LEMP stack on an Ubuntu 18.04 server, including Nginx, MySQL, and PHP. It also includes instructions for testing that these components can communicate effectively and serve your content correctly.
Submit an Answer