Skip to content

Instantly share code, notes, and snippets.

@modbender
Created December 21, 2022 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save modbender/9d3c4ed075feb36308c336bc910f9d15 to your computer and use it in GitHub Desktop.
Save modbender/9d3c4ed075feb36308c336bc910f9d15 to your computer and use it in GitHub Desktop.
Nginx configuration to reduce TTFB
server {
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;
ssl_buffer_size 8k;
ssl_verify_client off;
client_body_timeout 12;
client_header_timeout 12;
client_max_body_size 900m;
keepalive_timeout 65;
keepalive_disable none;
keepalive_requests 10000;
reset_timedout_connection on;
http2_push_preload on;
large_client_header_buffers 4 16k;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment