New Laravel (Homestead) installation: 502 Bad Gateway - *Refresh* - the website is displayed correctly

五迷三道 提交于 2019-12-03 03:26:01

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):

  1. xoff
  2. sudo service nginx restart
  3. sudo service php7.3-fpm restart
  4. 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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!