Fix 504 Gateway Timeout in Laravel Valet

Add:

proxy_connect_timeout 1200;
proxy_read_timeout 1200;
proxy_send_timeout 1200;
fastcgi_read_timeout 1200;
fastcgi_send_timeout 1200;

In /opt/homebrew/etc/nginx/nginx.conf, right before:

include "/Users/.../.config/valet/Nginx/*";
include servers/*;
include valet/valet.conf;

All credit to / solution from:

https://github.com/laravel/valet/issues/315#issuecomment-1362039656

https://dev.to/aubreypwd/how-i-configured-niginx-valet-to-stop-the-504-gateway-time-out-during-long-xdebug-sessions-174i