Whenever I try loading a project I get a 502 bad gateway error. I have tried refreshing the page I still get 502 error. what could be the issue?
This is a brand new fresh install of homestead with virtual box version 12.2.0
---
ip: "192.168.56.56"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: D:/git_projects/laravel/jonneyje
to: /home/vagrant/jonneyje
- map: D:/git_projects/laravel/brockphotography
to: /home/vagrant/brockphotography
- map: D:/git_projects/laravel/capstone
to: /home/vagrant/capstone
- map: D:/git_projects/laravel/abcbooks
to: /home/vagrant/abcbooks
- map: D:/git_projects/laravel/phpmyadmin
to: /home/vagrant/phpmyadmin
sites:
- map: jonneyje.test
to: /home/vagrant/jonneyje/public
php: "7.2"
- map: brockphotography.test
to: /home/vagrant/brockphotography/public
php: "8.3.0"
- map: capstone.test
to: /home/vagrant/capstone/public
php: "7.2"
- map: abcbooks.test
to: /home/vagrant/abcbooks/public
php: "7.2"
- map: phpmyadmin.test
to: /home/vagrant/phpmyadmin
databases:
- homestead
I have commented out the first top section of xdebug.ini zend_extension=xdebug.so and did absolutely nothing.
I also tried changing the php project version to 7.2 and I get a compatability error when accessing my project.
The temporary solution is to update your Homebrew PHP configuration.
Find the config file (it'll be named
homebrew.mxcl.php.plistand it'll be in your Homebrew location,/usr/local/or/etc/homebrew, under the folderCellar/php/8.3.0, assuming you're on PHP 8.3.0).Edit that file and add the following:
You'll add this directly under this line:
Now run
valet restartand try again.If that doesn't fix it, let's do a little more cleanup.
brew services stop phpto make sure you're not running PHP as your individual user (it should run as root)homebrew.mxcl.php.plistfiles that are in~/Library/LaunchAgents(this is the list of launch agents for your individual user)php83sock file (~/.config/valet/valet83.sock) and thenvalet installagainThis answer was copied from here. I hope that will be useful. It solves similar questions for this problem in this platform. However, there was no answer to this. That's why I wanted to copy it here.