Laravel Homestead 502 Bad Gateway

Laravel Homestead: 502 Bad Gateway after update

When updating Laravel Homestead to a newer version, in some case, there can be a Nginx 502 Bad Gateway error.

You can solve this by:

  1. Go to /var/log/nginx and view your test domain’s .log file.
  2. In our case we saw an error like:

    *10 connect() to unix:/var/run/php/php7.4-fpm.sock failed (2: No such file or directory) while connecting to upstream.
  3. In our case, just a restart of PHP was enough:

    sudo service php7.4-fpm restart

    Replace php7.4 with your PHP version.

This solved it for us.

Did you find another cause and solution? Let us know in the comments.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top