mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-13 02:14:32 +01:00
prettify nginx.conf
- align to tab - align to block - remove blank lines & trailing whitespaces - 404 on database.db - 404 on /download - 404 on /test
This commit is contained in:
parent
954ac1eb07
commit
50df8e7dd9
1 changed files with 205 additions and 255 deletions
|
@ -75,7 +75,6 @@ http {
|
|||
# return 400 "Gateway Timeout";
|
||||
#}
|
||||
|
||||
|
||||
location /news {
|
||||
return 301 https://blog.ajay.app/sponsorblock;
|
||||
}
|
||||
|
@ -85,7 +84,8 @@ http {
|
|||
}
|
||||
|
||||
location /test/ {
|
||||
proxy_pass http://localhost:4440/;
|
||||
return 404 "";
|
||||
#proxy_pass http://localhost:4440/;
|
||||
#proxy_pass https://sbtest.etcinit.com/;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,6 @@ http {
|
|||
#return 200 "";
|
||||
}
|
||||
|
||||
|
||||
location /api/getVideoSponsorTimes {
|
||||
proxy_pass http://backend_GET;
|
||||
}
|
||||
|
@ -120,7 +119,6 @@ http {
|
|||
access_log /etc/nginx/logs/download.log no_ip;
|
||||
gzip on;
|
||||
gzip_types text/plain application/json;
|
||||
#alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
#return 307 https://cdnsponsor.ajay.app$request_uri;
|
||||
}
|
||||
|
@ -130,16 +128,15 @@ http {
|
|||
}
|
||||
|
||||
location = /database.db {
|
||||
#return 404 "Sqlite database has been replaced with csv exports at https://sponsor.ajay.app/database. Sqlite exports might come back soon, but exported at longer intervals.";
|
||||
return 404 "Sqlite database has been replaced with csv exports at https://sponsor.ajay.app/database. Sqlite exports might come back soon, but exported at longer intervals.";
|
||||
#alias /home/sbadmin/sponsor/databases/sponsorTimes.db;
|
||||
alias /home/sbadmin/test-db/database.db;
|
||||
#alias /home/sbadmin/test-db/database.db;
|
||||
}
|
||||
|
||||
#location = /database/sponsorTimes.csv {
|
||||
# alias /home/sbadmin/sponsorTimes.csv;
|
||||
#}
|
||||
|
||||
|
||||
#location /api/voteOnSponsorTime {
|
||||
# return 200 "Success";
|
||||
#}
|
||||
|
@ -156,7 +153,6 @@ http {
|
|||
root /home/sbadmin/SponsorBlockSite/public-prod;
|
||||
}
|
||||
|
||||
|
||||
listen 443 default_server ssl http2; # managed by Certbot
|
||||
#listen 443 http3 reuseport;
|
||||
#ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
@ -165,33 +161,19 @@ http {
|
|||
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0003/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name cdnsponsor.ajay.app;
|
||||
|
||||
error_page 404 /404.html;
|
||||
|
||||
#location /database/ {
|
||||
# alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
#}
|
||||
|
||||
location /download/ {
|
||||
alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
}
|
||||
#location /download/ {
|
||||
# alias /home/sbadmin/sponsor/docker/database-export/;
|
||||
#}
|
||||
|
||||
location / {
|
||||
root /home/sbadmin/SponsorBlockSite/public-prod;
|
||||
|
@ -203,59 +185,41 @@ http {
|
|||
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
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
server {
|
||||
|
||||
access_log off;
|
||||
error_log /etc/nginx/logs/log.txt;
|
||||
|
||||
|
||||
if ($host = api.sponsor.ajay.app) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
if ($host = sponsor.ajay.app) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
listen 80;
|
||||
server_name sponsor.ajay.app api.sponsor.ajay.app;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = cdnsponsor.ajay.app) {
|
||||
return 301 https://$host$request_uri;
|
||||
} # managed by Certbot
|
||||
|
||||
|
||||
server_name cdnsponsor.ajay.app;
|
||||
listen 80;
|
||||
return 404; # managed by Certbot
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
server_name wiki.sponsor.ajay.app; # managed by Certbot
|
||||
|
||||
location / {
|
||||
proxy_pass http://10.0.0.3:8080;
|
||||
}
|
||||
|
||||
|
||||
listen 443 ssl http2; # managed by Certbot
|
||||
#listen 443 http3 reuseport;
|
||||
#ssl_protocols TLSv1.2 TLSv1.3;
|
||||
|
@ -264,19 +228,5 @@ http {
|
|||
ssl_certificate_key /etc/letsencrypt/live/sponsor.ajay.app-0003/privkey.pem; # managed by Certbot
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
||||
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue