Ana içeriğe geç

Nginx Reverse Proxy

Genel Ayarlar

worker_processes auto;
client_max_body_size 100M; # OTA firmware (~16MB)
keepalive_timeout 65s;
gzip on; # Level 6, min 1KB

Rate Limiting

ZoneRateAçıklama
api_limit30 req/sAPI endpoint'leri
login_limit5 req/mBrute-force koruması

HTTPS (Port 443)

ssl_certificate /etc/letsencrypt/live/enerji.kepmark.com/fullchain.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_stapling on;

# Security Headers
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;

Location Kuralları

PathBackendTimeoutRate LimitNot
/api/backend:8000120s30r/sAPI
/api/auth/loginbackend:80005r/mBrute-force koruması
/docs, /redocbackend:8000localhost onlySwagger UI
/wsbackend:80004 saatWebSocket
/healthbackend:8000Health check
/_next/static/frontend:3000Cache 1 yılStatik dosyalar
/frontend:300060sReact uygulaması