Troubleshooting Valet on macOS Sierra
Apache is running on port 80 and interfering with Valet.
sudo /usr/sbin/apachectl stop
valet restart
You are probably still on Valet <= 1.1.19, we recommend pinning to ^1.1.22.
Edit ~/.composer/composer.json
to point to ^1.1.22
:
- "laravel/valet": "^1.1.19",
+ "laravel/valet": "^1.1.22",
Run composer global update
Restart Valet: valet restart
You are running Caddy 0.9.2, which has a known bug related to fastcgi connections.
Edit ~/.composer/composer.json
to point to ^1.1.22
:
- "laravel/valet": "^1.1.19",
+ "laravel/valet": "^1.1.22",
Run composer global update
Ensure you are now running Caddy 0.9.1: ~/.composer/vendor/laravel/valet/bin/caddy -version
Restart Valet: valet restart
Usually this means something is fucked with PHP FPM.
Confirm that FPM is not running:
ps aux | grep fpm
You should see at least two processes there if PHP FPM is running (one is grep, ignore that one.)
Chances are PHP FPM is not running.
Check the PHP FPM error log to find out why it's not running:
cat /usr/local/opt/php70/var/log/php-fpm.log
Try to resolve any errors you see. Here's a few common ones:
/var/run/valet/fpm.socket
does not exist!If you see an error similar to:
Unable to bind listening socket for address '/var/run/valet/fpm.socket': No such file or directory
...in /usr/local/opt/php70/var/log/php-fpm.log
, you were probably running dev-master
and have now switched back to tagged releases.
Valet 1.1.22 attempts to automate fixing this issue by explicitly configuring where PHP FPM should listen.
Make sure ~/.composer/composer.json
points to ^1.1.22
:
- "laravel/valet": "^1.1.19",
+ "laravel/valet": "^1.1.22",
Run composer global update
Run valet install
php-fpm.conf
is missing!Something went wrong when installing PHP through Homebrew. This seems to happen on fresh non-upgrade installations of macOS Sierra.
brew uninstall php70
brew install php70 --build-from-source
valet install
If you are still running into problems and are a capable adult, here's a list of log files to check:
Caddy start log:
/tmp/com.laravel.valetServer.err
PHP FPM error log:
/usr/local/opt/php70/var/log/php-fpm.log
Caddy error log:
~/.valet/Log/error.log