How to fix Valet return 502 Bad Gateway

How to fix Valet return 502 Bad Gateway

167

You might have faced 502 Bad Gateway error when you tried to access your local websites using laravel valet. If so, this article is for you.

In case you're getting this error means you've already have brew valet php mysql and other necessary packages installed on your system. So we will skip those steps and focus on current issue fix

Open your terminal and write following codes line by line:

brew unlink php && brew link php
brew services restart --all
composer global update
valet start

Note: if you got error on running composer global update add sudo like this:

sudo composer global update 

make sure you have your brew packages up-to-date always

- Last updated 4 months ago

Be the first to leave a comment.

You must login to leave a comment