nginx.conf/nginx.conf
Arija A. 481c2ae196
Remove internal nginx config
Signed-off-by: Arija A. <ari@ari.lt>
2026-06-10 00:24:41 +03:00

64 lines
1.5 KiB
Nginx Configuration File

user www;
worker_processes 4;
worker_rlimit_nofile 65535;
# NOTE: Nginx has a bug where it should be reloaded using `nginx -s quit && nginx`
# if HTTP/3 is enabled. It sucks but oh well.
quic_bpf on;
events {
use epoll;
multi_accept on;
worker_connections 8192;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
reset_timedout_connection on;
types_hash_max_size 4096;
server_names_hash_bucket_size 128;
server_names_hash_max_size 2048;
keepalive_requests 2000;
send_timeout 15;
keepalive_timeout 15;
client_body_timeout 10;
client_header_timeout 10;
limit_req_status 429;
limit_req_zone $binary_remote_addr zone=all:15m rate=50r/s;
limit_req_zone $binary_remote_addr zone=allm:15m rate=1000r/m;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
log_format combined_sanitised
'$remote_addr - $remote_user [$time_local] '
'"$request_method $uri $server_protocol" '
'$status $body_bytes_sent '
'"-" "-"';
map "$ssl_early_data:$request_method" $block_early {
default 0;
"1:GET" 0;
"1:HEAD" 0;
"1:OPTIONS" 0;
"~^1:" 1;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/default.conf;
include /etc/nginx/sites-enabled.d/*.conf;
}