mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 06:27:10 +03:00
Merge pull request #442 from mchangrh/nginx-update
update nginx configs
This commit is contained in:
@@ -19,16 +19,15 @@ http {
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
include /etc/nginx/proxy.conf;
|
||||
include /etc/nginx/fastcgi.conf;
|
||||
## Custom MIME definition
|
||||
# error_map has to be at http level
|
||||
include /etc/nginx/error_map.conf;
|
||||
# Custom MIME definition
|
||||
types {
|
||||
text/csv csv;
|
||||
}
|
||||
# keepalive settings
|
||||
keepalive_requests 10;
|
||||
keepalive_timeout 5;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
access_log off;
|
||||
#error_log /etc/nginx/logs/error.log warn;
|
||||
error_log /dev/null crit;
|
||||
@@ -70,15 +69,11 @@ http {
|
||||
server 10.0.0.3:4441;
|
||||
#server 10.0.0.3:4442;
|
||||
}
|
||||
upstream backend_OPTIONS {
|
||||
server 10.0.0.3:4441;
|
||||
}
|
||||
upstream backend_db {
|
||||
server 10.0.0.4:4441;
|
||||
#server 10.0.0.3:4441;
|
||||
#server 10.0.0.4;
|
||||
}
|
||||
|
||||
upstream backend_db_dl {
|
||||
server 10.0.0.4;
|
||||
}
|
||||
@@ -90,26 +85,7 @@ http {
|
||||
server {
|
||||
server_name sponsor.ajay.app api.sponsor.ajay.app;
|
||||
|
||||
error_page 404 /404.html;
|
||||
#error_page 500 @myerrordirective_500;
|
||||
#error_page 502 @myerrordirective_502;
|
||||
#error_page 504 @myerrordirective_504;
|
||||
#location = /404 {
|
||||
# root /home/sbadmin/caddy/SponsorBlockSite/public-prod;
|
||||
# internal;
|
||||
#}
|
||||
|
||||
#proxy_send_timeout 120s;
|
||||
|
||||
#location @myerrordirective_500 {
|
||||
# return 400 "Internal Server Error";
|
||||
#}
|
||||
#location @myerrordirective_502 {
|
||||
# return 400 "Bad Gateway";
|
||||
#}
|
||||
#location @myerrordirective_504 {
|
||||
# return 400 "Gateway Timeout";
|
||||
#}
|
||||
include /etc/nginx/error.conf;
|
||||
|
||||
location /news {
|
||||
return 301 https://blog.ajay.app/sponsorblock;
|
||||
@@ -128,6 +104,7 @@ http {
|
||||
#access_log /etc/nginx/logs/requests.log no_ip buffer=64k;
|
||||
|
||||
location /api/skipSegments {
|
||||
include /etc/nginx/cors.conf;
|
||||
#return 200 "[]";
|
||||
proxy_pass http://backend_$request_method;
|
||||
#proxy_cache CACHEZONE;
|
||||
@@ -139,31 +116,35 @@ http {
|
||||
if ($request_method = POST) {
|
||||
access_log /etc/nginx/logs/submissions.log user_agent buffer=64k;
|
||||
}
|
||||
|
||||
|
||||
#proxy_read_timeout 6s;
|
||||
#proxy_next_upstream error timeout http_500 http_502;
|
||||
}
|
||||
|
||||
location /api/getTopUsers {
|
||||
include /etc/nginx/cors.conf;
|
||||
proxy_pass http://backend_GET;
|
||||
proxy_cache CACHEZONE;
|
||||
proxy_cache_valid 20m;
|
||||
}
|
||||
|
||||
location /api/getTotalStats {
|
||||
include /etc/nginx/cors.conf;
|
||||
proxy_pass http://backend_GET;
|
||||
proxy_cache CACHEZONE;
|
||||
proxy_cache_valid 20m;
|
||||
#return 200 "";
|
||||
#return 204;
|
||||
}
|
||||
|
||||
location /api/getTopCategoryUsers {
|
||||
include /etc/nginx/cors.conf;
|
||||
proxy_pass http://backend_GET;
|
||||
proxy_cache CACHEZONE;
|
||||
proxy_cache_valid 20m;
|
||||
}
|
||||
|
||||
location /api/getVideoSponsorTimes {
|
||||
include /etc/nginx/cors.conf;
|
||||
proxy_pass http://backend_GET;
|
||||
}
|
||||
|
||||
@@ -179,10 +160,11 @@ http {
|
||||
#proxy_buffering off;
|
||||
|
||||
|
||||
proxy_pass http://backend_db;
|
||||
proxy_pass http://backend_db;
|
||||
#alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
#return 307 https://rsync.sponsor.ajay.app$request_uri;
|
||||
}
|
||||
|
||||
location /database {
|
||||
proxy_pass http://backend_db;
|
||||
#return 200 "Disabled for load reasons";
|
||||
@@ -207,6 +189,7 @@ http {
|
||||
#}
|
||||
|
||||
location /api {
|
||||
include /etc/nginx/cors.conf;
|
||||
proxy_pass http://backend_POST;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user