Skip to content

Instantly share code, notes, and snippets.

@olssonm
Created August 23, 2023 16:36
Show Gist options
  • Save olssonm/c2c1728465555fc83f4f673df1f1ecf8 to your computer and use it in GitHub Desktop.
Save olssonm/c2c1728465555fc83f4f673df1f1ecf8 to your computer and use it in GitHub Desktop.
Enable older PHP-versions in Laravel Homestead
# Synchronize the state of FPM-services for said PHP-version
sudo systemctl enable php7.4-fpm
sudo service php7.4-fpm restart
@olssonm
Copy link
Author

olssonm commented Aug 23, 2023

When provisioning Homestead and you encounter 502 Bad Gateway-errors, check the sites nginx-log. You might have an issue similar to:

connect() to unix:/var/run/php/php7.4-fpm.sock failed

More likely then not this means that /var/run/php/php7.4-fpm.sock does not exist. Use sudo systemctl enable php7.4-fpm to enable and synchronize the FPM-service.

Just change php7.4 for whatever version you are looking for (5.6 and up).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment