Created
March 27, 2020 18:25
-
-
Save lform-design/7e9a36bfec1063aca6615e14d603a727 to your computer and use it in GitHub Desktop.
Revisions
-
lform-design created this gist
Mar 27, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ # Fixing 502 Bad Gateway Errors on Valet with Nginx This error is usually caused by AJAX calls, and is due to there being too much data in the request for Nginx to process with its current settings. 1. Create `~/.config/valet/nginx/all.conf` with the following: proxy_buffer_size 4096k; proxy_buffers 128 4096k; proxy_busy_buffers_size 4096k; 2. Append the following to `/usr/local/etc/nginx/fastcgi_params` fastcgi_buffer_size 4096k; fastcgi_buffers 128 4096k; fastcgi_busy_buffers_size 4096k; 3. Restart valet as both Nginx and PHP-FPM must be restarted for these settings to take effect.