New Laravel (Homestead) installation: 502 Bad Gateway - *Refresh* - the website is displayed correctly
Aaron Belz exact steps didn't work for me, but following the link did.
It was xdebug, unfortunately for me too.
sudo vim /etc/php/7.3/mods-available/xdebug.ini
And prefixed all the lines with ;
- then followed Aaron's instructions:
sudo service nginx restart
sudo service php7.3-fpm restart
And it worked. Now I'm worried if I need xdebug for anything - I'm not gonna be able to use it until I find the fix. Ah well, cross that bridge when I get there :D
I will also note I'm on Windows, and I know Vagrant sometimes has problems with that so maybe that has something to do with it.
Try to disable XDebug. This worked for me but feels sorta hacky. I'll update this if I come up with a better solution.
There should already be an xoff
alias in "aliases". So run xoff
in your vagrant box, then restart NGINX and PHP7.3-FPM. (If you don't have or want the alias use sudo phpdismod -s cli xdebug
in-place of "xoff" where I mention it)
Here's the steps (remember this is done through the homestead box):
xoff
sudo service nginx restart
sudo service php7.3-fpm restart
- Try again after a hard reload and pray!
Again I'm not satisfied with this solution yet. However here's how to disable XDbug in a more proper way although I have not tested yet, so let me know how it goes if you try.
Hope this works for you, I spent all night trying to figure this one out lol. As such its 5 am and I'm not even sure if I'm speaking English anymore.