In the past I’ve always gotten around router issues in Local when using Valet for other projects by simply uninstalling Valet whenever I needed to make the switch. Now, however, when I uninstall Valet and close Docker Desktop I get 502 errors with some of my Local sites. It seems to only happen to sites where I have recently copied backup files from their live counterparts using UpdraftPlus in order to get an updated copy of the site. Other sites work fine, even on the same PHP version (8.1.23). Error log shows issue with php-fpm.
Create backup files on a live site with UpdraftPlus, download backup files. Create blank site locally or use existing local site and upload UpdraftPlus backups through admin interface (UpdraftPlus settings). After that, site will through 502 Bad Gateway Error. Switching to PHP 7 has the site loading again but with a PHP dependency error message.
Operating System (OS) and OS version:
MacOS Sonoma 14.2.1 (23C71)
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.