Files
iplist/nginx/nginx.conf
2026-01-06 15:27:22 +03:00

34 lines
985 B
Nginx Configuration File

user nginx;
worker_processes 5;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
set_real_ip_from 172.0.0.0/8;
proxy_cache_path /var/cache/nginx levels=1:2:2 keys_zone=local_cache:150m inactive=1h max_size=200m;
proxy_cache_key "$scheme$request_method$host$request_uri";
proxy_cache_use_stale error timeout invalid_header http_500;
proxy_ignore_headers Cache-Control Set-Cookie Expires;
include /etc/nginx/conf.d/*.conf;
}