mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Kill dead nginx processes to avoid memory leak #372
This commit is contained in:
26
nginx/fastcgi.conf
Normal file
26
nginx/fastcgi.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param REQUEST_SCHEME $scheme;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
||||
@@ -1,5 +1,6 @@
|
||||
worker_processes 8;
|
||||
worker_rlimit_nofile 65536;
|
||||
worker_shutdown_timeout 10;
|
||||
|
||||
events {
|
||||
worker_connections 432768; # Default: 1024
|
||||
@@ -12,7 +13,7 @@ http {
|
||||
|
||||
log_format user_agent '[$time_local] '
|
||||
'"$http_referer" "$http_user_agent" "$gzip_ratio"';
|
||||
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
include /etc/nginx/proxy.conf;
|
||||
include /etc/nginx/fastcgi.conf;
|
||||
@@ -33,7 +34,7 @@ http {
|
||||
|
||||
#server 134.209.69.251:80 backup;
|
||||
|
||||
server 116.203.32.253:80 backup;
|
||||
#server 116.203.32.253:80 backup;
|
||||
#server 116.203.32.253:80;
|
||||
}
|
||||
upstream backend_POST {
|
||||
@@ -42,6 +43,9 @@ 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 localhost:4441;
|
||||
#server 10.0.0.3:4441;
|
||||
@@ -98,6 +102,8 @@ http {
|
||||
if ($request_method = POST) {
|
||||
access_log /etc/nginx/logs/submissions.log user_agent;
|
||||
}
|
||||
#if ($request_method = GET) {
|
||||
#}
|
||||
}
|
||||
|
||||
location /api/getTopUsers {
|
||||
@@ -189,7 +195,6 @@ http {
|
||||
|
||||
server {
|
||||
access_log off;
|
||||
error_log /etc/nginx/logs/log.txt;
|
||||
|
||||
if ($host = api.sponsor.ajay.app) {
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
11
nginx/proxy.conf
Normal file
11
nginx/proxy.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_max_body_size 10m;
|
||||
client_body_buffer_size 128k;
|
||||
proxy_connect_timeout 10;
|
||||
proxy_send_timeout 10;
|
||||
proxy_read_timeout 10;
|
||||
#worker_shutdown_timeout 10;
|
||||
proxy_buffers 32 4k;
|
||||
Reference in New Issue
Block a user