Currently experiencing issues with Laravel Valet where I am able to run some sites normally that have only a few SQL requests such as the front end of WordPress but if you navigate to /wp-admin I'm presented with 502 Bad Gateway.
Current Setup:
- MySQL 5.7
- PHP 7.3.6
- Nginx 1.17.1
- Composer 1.8.6
- Brew (Latest Version)
- Laravel Valet 2.3.3
- Mac OS 10.14.5 (Clean install from the ground up)
I have followed the Laravel Valet installation tutorial by each step exactly. https://laravel.com/docs/5.8/valet#installation
The error in the file nginx-error.log is as follows:
*1 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: demo.test, request: "GET /wp-admin/ HTTP/2.0", upstream: "fastcgi://unix:/Users/admin/.config/valet/valet.sock:", host: "demo.test", referrer: "https://demo.test/"
I've tried this on another users computer and they also fall foul of the same issue.
Fixes I've tried:
- Tried using
valet install
to fix permissions & config - Restarting php & nginx
sudo brew services restart nginx && sudo brew services restart php
- Changing the Nginx buffer sizes
- Simple computer reboot
- Tried to build PHP from source but no luck on downloading the file (via brew)
brew uninstall php; brew install php --build-from-source; valet install
- Brew's cleanup & doctor
It would be very helpful if anyone could shine some light on this as looking around people seem to have the same problem and there is no clear fix.