mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
nginx tuning
- whitespace formatting - added keepalive - buffer access_logs friendship ended with http/2, nginx is my new best friend
This commit is contained in:
@@ -21,6 +21,12 @@ http {
|
|||||||
types {
|
types {
|
||||||
text/csv csv;
|
text/csv csv;
|
||||||
}
|
}
|
||||||
|
# keepalive settings
|
||||||
|
keepalive 5;
|
||||||
|
keepalive_request 10;
|
||||||
|
keepalive_timeout 5;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
|
||||||
upstream backend_GET {
|
upstream backend_GET {
|
||||||
ip_hash;
|
ip_hash;
|
||||||
@@ -109,7 +115,7 @@ http {
|
|||||||
#proxy_pass https://sbtest.etcinit.com/;
|
#proxy_pass https://sbtest.etcinit.com/;
|
||||||
}
|
}
|
||||||
|
|
||||||
#access_log /etc/nginx/logs/requests.log no_ip;
|
#access_log /etc/nginx/logs/requests.log no_ip buffer=64k;
|
||||||
|
|
||||||
location /api/skipSegments {
|
location /api/skipSegments {
|
||||||
#return 200 "[]";
|
#return 200 "[]";
|
||||||
@@ -120,7 +126,7 @@ http {
|
|||||||
#access_log /etc/nginx/logs/download.log no_ip;
|
#access_log /etc/nginx/logs/download.log no_ip;
|
||||||
gzip on;
|
gzip on;
|
||||||
if ($request_method = POST) {
|
if ($request_method = POST) {
|
||||||
access_log /etc/nginx/logs/submissions.log user_agent;
|
access_log /etc/nginx/logs/submissions.log user_agent buffer=64k;
|
||||||
}
|
}
|
||||||
|
|
||||||
#proxy_read_timeout 6s;
|
#proxy_read_timeout 6s;
|
||||||
@@ -145,7 +151,7 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /download/ {
|
location /download/ {
|
||||||
#access_log /etc/nginx/logs/download.log no_ip;
|
#access_log /etc/nginx/logs/download.log no_ip buffer=64k;
|
||||||
gzip on;
|
gzip on;
|
||||||
proxy_cache CACHEZONE;
|
proxy_cache CACHEZONE;
|
||||||
proxy_cache_valid 20m;
|
proxy_cache_valid 20m;
|
||||||
@@ -196,14 +202,6 @@ http {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
@@ -228,10 +226,6 @@ http {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
@@ -281,9 +275,5 @@ http {
|
|||||||
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0001/privkey.pem; # managed by Certbot
|
||||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user