Skip to content

Commit

Permalink
disable keepalive by default
Browse files Browse the repository at this point in the history
No need for keepalive for the HTTPS www redirects or the internal
socket.
  • Loading branch information
thestinger committed Mar 20, 2024
1 parent f16933e commit 8ef81ef
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ http {
sendfile_max_chunk 256k;
tcp_nopush on;
keepalive_requests 256;
keepalive_timeout 3m;
keepalive_timeout 0;
server_tokens off;
msie_padding off;

Expand Down Expand Up @@ -91,8 +91,6 @@ http {
listen 80 default_server backlog=4096;
listen [::]:80 default_server backlog=4096;

keepalive_timeout 0;

# https://trac.nginx.org/nginx/ticket/2012
location / {
return 404;
Expand All @@ -104,8 +102,6 @@ http {
listen [::]:80;
server_name seamlessupdate.app www.seamlessupdate.app releases.grapheneos.org apps.grapheneos.org;

keepalive_timeout 0;

location /.well-known/acme-challenge/ {
return 301 http://0.releases.grapheneos.org$request_uri;
}
Expand All @@ -120,8 +116,6 @@ http {
listen [::]:80;
server_name 0.releases.grapheneos.org;

keepalive_timeout 0;

location /.well-known/acme-challenge/ {
root /srv/certbot;
}
Expand All @@ -136,8 +130,6 @@ http {
listen [::]:443 default_server ssl http2 backlog=4096;
ssl_reject_handshake on;

keepalive_timeout 0;

# https://trac.nginx.org/nginx/ticket/2012
location / {
return 404;
Expand All @@ -161,6 +153,8 @@ http {

include root_releases.grapheneos.org.conf;

keepalive_timeout 3m;

open_file_cache max=2048 inactive=1d;
open_file_cache_valid 1d;

Expand Down Expand Up @@ -292,6 +286,8 @@ http {

include root_apps.grapheneos.org.conf;

keepalive_timeout 3m;

open_file_cache max=2048 inactive=1d;
open_file_cache_valid 1d;

Expand Down

0 comments on commit 8ef81ef

Please sign in to comment.