valet: [Valet 2.0.3] 500 Bad Gateway on every static file
Hello. In the newest Laravel Valet any time I access any site assets are not being loaded e.g.
laravel new test
cd test
php artisan make:auth
Navigate to test.dev site is working. When I click on Login on /login no assets are being loaded and every one of them gets 500 error.

In #242 it was sending 404 along with the response. Now it is not sending anything, just an nginx error.
In the mean time
At the same time valet secure did not work at all (every site served over https resulted in “This site can’t be reached” or something like that).

About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 49 (12 by maintainers)
I too had the same problem. It may have been due to nginx being installed previously.
Following the instructions to install with the
--with-http2flag worked for me.Few questions:
Did you run
valet installafter upgrading to 2.0.3?Can you post the contents of the following files?
Did you have nginx already installed via homebrew before installing Valet? It needs to be installed with the
--with-http2flag for HTTPS to work properly. Valet will install it using that flag for you if it’s not already installed, but if it was already installed, try:Never mind. Still doesn’t work 😕
I actually had a similar problem last night where
brew services restartwasn’t working properly, butstopthenstartalways worked. Related to permissions for those same files you changed.I pushed a “fix” for this on the master branch:
https://github.com/laravel/valet/commit/3027a0dbbac35e8ae1ca93475835bd611c4ea25e
If anyone wants to update to
dev-masterand see if that fixes anything for them I’d be interested in hearing about it.I’ve encounter this too. Don’t know why but doing
valet installjust completely broke… well everything for valet. So IAnd everything started working correctly. (and
valet restartworks as expected) It appears that the permissions for newly installed launch daemon plists are either broken or I did something strange.I realize these steps are close to nuclear (you’ll have to setup your valet settings again, a la
valet domainandvalet park) but I figured that I’d put them here if it happens to help someone. I think I got all the steps down. Let me know if these don’t seem to help. There was a large amount of intermediate debugging and “what the heck is going on” for the last hour or so.I have the same problem. Any solution now? UPDATE: Problem solved after I reboot my mac…WTF