Update nginx config

This commit is contained in:
Ajay Ramachandran
2021-06-14 22:25:24 +02:00
parent 1c8c76831e
commit 8cce2a5977

View File

@@ -1,8 +1,8 @@
worker_processes 8;
worker_rlimit_nofile 8192;
worker_rlimit_nofile 65536;
events {
worker_connections 132768; ## Default: 1024
worker_connections 432768; ## Default: 1024
}
http {
@@ -13,7 +13,7 @@ http {
upstream backend_GET {
least_conn;
server localhost:4441;
server localhost:4442;
#server localhost:4442;
#server localhost:4443;
#server localhost:4444;
#server localhost:4445;
@@ -48,9 +48,9 @@ http {
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;
#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;
@@ -58,15 +58,15 @@ http {
#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";
}
#location @myerrordirective_500 {
# return 400 "Internal Server Error";
#}
#location @myerrordirective_502 {
# return 400 "Bad Gateway";
#}
#location @myerrordirective_504 {
# return 400 "Gateway Timeout";
#}
location /news {
@@ -106,8 +106,11 @@ http {
}
location /download/ {
gzip on;
gzip_types text/plain application/json;
#alias /home/sbadmin/sponsor/docker/database-export/;
return 307 https://cdnsponsor.ajay.app$request_uri;
alias /home/sbadmin/sponsor/docker/database-export/;
#return 307 https://cdnsponsor.ajay.app$request_uri;
}
location /database {
proxy_pass http://backend_db;
@@ -250,7 +253,7 @@ http {
server {
access_log off;
error_log /dev/null;
error_log /etc/nginx/logs/log.txt;
if ($host = api.sponsor.ajay.app) {