1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 09:10:03 +01:00

Increase nginx buffer sizes in dev

These larger buffer sizes accommodate larger requests that are often complained about in Valet support issues.
These updates are inspired by common configs in Homestead.

I've been using these in my local Valet config for 4+ months, without any negative side-effects.

Edit: commented-out several, and made consistent with Forge defaults
This commit is contained in:
Chris Brown
2019-09-07 17:33:51 -04:00
parent b14ce74087
commit 536e59990b
2 changed files with 26 additions and 0 deletions

View File

@@ -18,3 +18,17 @@ fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https if_not_empty; fastcgi_param HTTPS $https if_not_empty;
fastcgi_param REDIRECT_STATUS 200; fastcgi_param REDIRECT_STATUS 200;
fastcgi_param HTTP_PROXY ""; fastcgi_param HTTP_PROXY "";
# Very large cookies/headers may throw errors without the following (extremely generous) settings:
#fastcgi_buffer_size 4096k;
#fastcgi_buffers 128 4096k;
#fastcgi_busy_buffers_size 4096k;
# Long-running/slow services
fastcgi_read_timeout 300;
#proxy_connect_timeout 600;
#proxy_send_timeout 600;
#proxy_read_timeout 600;
#send_timeout 600;

View File

@@ -31,3 +31,15 @@ server {
deny all; deny all;
} }
} }
## Size Limits & Buffer Overflows
## the size may be configured based on the needs.
client_body_buffer_size 100k;
client_header_buffer_size 1k;
large_client_header_buffers 2 1k;
# large buffer support
#proxy_buffer_size 4096k;
#proxy_buffers 128 4096k;
#proxy_busy_buffers_size 4096k;