Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

longestdrive's avatar

Homestead v6.5.0 bad gatweway error 502 trying to use php 5.6

Hi I'm using the latest version of homestead v6.5.0. The set up is working well for my Laravel 5 sites but not for a laravel 4.2 site.

I've set the php version to 5.6 for the site in homestead.yaml as detailed in the guidance. However when I try to access the site I get a bad gateway 502 error

checking the nginx log file I found this error:

connect() to unix:/var/run/php/php5.6-fpm.sock failed (2: No such file or directory) while connecting to upstream

Checking that directory none of the php5.6-fpm files are there.

How do I install these to the homestead machine?

Thanks

0 likes
1 reply
longestdrive's avatar

Just tried installing using:

sudo apt-get install php5.6-fpm --fix-missing

and I got this message: php5.6-fpm is already the newest version

So this must be in a different location? So, do I need to update a config file for this version of php-fpm?

Please or to participate in this conversation.