2022-01-04 07:28:17 +01:00
|
|
|
# basics
|
|
|
|
sendfile on;
|
|
|
|
tcp_nopush on;
|
|
|
|
tcp_nodelay on;
|
|
|
|
server_tokens off;
|
|
|
|
server_name_in_redirect off;
|
|
|
|
|
|
|
|
# default logs
|
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
|
|
|
|
# reset timed out connections freeing ram
|
|
|
|
reset_timedout_connection on;
|
|
|
|
# maximum time between packets the client can pause when sending nginx any data
|
|
|
|
client_body_timeout 10s;
|
|
|
|
# maximum time the client has to send the entire header to nginx
|
|
|
|
client_header_timeout 10s;
|
|
|
|
# timeout which a single keep-alive client connection will stay open
|
|
|
|
keepalive_timeout 69s;
|
|
|
|
# maximum time between packets nginx is allowed to pause when sending the client data
|
2022-01-27 06:56:38 +01:00
|
|
|
send_timeout 69s;
|
2022-01-04 07:28:17 +01:00
|
|
|
|
|
|
|
# number of requests per connection, does not affect SPDY
|
2022-01-27 06:56:38 +01:00
|
|
|
keepalive_requests 1337;
|
2022-01-04 07:28:17 +01:00
|
|
|
|
|
|
|
# enable gzip compression
|
|
|
|
gzip on;
|
|
|
|
gzip_vary on;
|
|
|
|
gzip_comp_level 6;
|
|
|
|
gzip_min_length 1000;
|
|
|
|
gzip_proxied expired no-cache no-store private auth;
|
|
|
|
# text/html is always compressed by gzip module
|
|
|
|
gzip_types application/javascript application/json application/ld+json application/manifest+json application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard;
|
|
|
|
|
|
|
|
# limit request body size
|
|
|
|
client_max_body_size 10m;
|
|
|
|
|
2022-11-30 10:10:47 +01:00
|
|
|
# need to bump this up for about page sponsor images lol
|
|
|
|
http2_max_concurrent_streams 256;
|