EndGame/nginx.conf

81 lines
2.0 KiB
Nginx Configuration File
Raw Permalink Normal View History

2024-07-08 20:09:12 +00:00
user www-data;
worker_processes auto;
pid /var/run/nginx.pid;
load_module modules/modules/ngx_http_headers_more_filter_module.so;
load_module modules/modules/ngx_http_naxsi_module.so;
load_module modules/modules/ngx_http_echo_module.so;
load_module modules/modules/ndk_http_module.so;
load_module modules/modules/ngx_http_lua_module.so;
events {
worker_connections 8096;
}
http {
##
# Basic Settings
##
server_tokens off;
# Keep Alive
sendfile on;
tcp_nopush on;
tcp_nodelay on;
reset_timedout_connection on;
lua_shared_dict blocked_cookies 250M;
# Timeouts
client_body_timeout 20s;
client_header_timeout 20s;
keepalive_timeout 600s;
send_timeout 20s;
client_max_body_size 10m;
client_body_buffer_size 10m;
proxy_connect_timeout 120s;
proxy_send_timeout 20s;
proxy_read_timeout 20s;
directio 8m;
directio_alignment 4k;
log_format detailed escape=json
'{'
'"timestamp": "$time_iso8601",'
'"remote_addr": "$remote_addr",'
'"upstream_addr": "$upstream_addr",'
'"connection": "$connection",'
'"connection_requests": "$connection_requests",'
'"request_time": "$request_time",'
'"upstream_response_time": "$upstream_response_time",'
'"status": "$status",'
'"upstream_status": "$upstream_status",'
'"body_bytes_sent": "$body_bytes_sent ",'
'"request": "$request",'
'"http_user_agent": "$http_user_agent",'
'"cookies": "$http_cookie"'
'}';
access_log /var/log/nginx/access.log;
proxy_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/naxsi_core.rules;
gzip on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xm;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
gzip_comp_level 9;
#add_header X-Content-Type-Options "nosniff";
#add_header X-Frame-Options "SAMEORIGIN";
#add_header X-Xss-Protection "1; mode=block";
##
# Virtual Host Configs
##
include /etc/nginx/sites-enabled/*;
}