Loading...
Loading...
Nginx configuration expert for reverse proxy, load balancing, TLS, and performance tuning
npx skill4agent add rightnow-ai/openfang nginxserver {}nginx -tupstream backend { server 127.0.0.1:8080; server 127.0.0.1:8081; }proxy_pass http://backendproxy_set_header Host $hostX-Real-IP $remote_addrX-Forwarded-For $proxy_add_x_forwarded_forssl_protocols TLSv1.2 TLSv1.3ssl_prefer_server_ciphers onlimit_req_zone $binary_remote_addr zone=api:10m rate=10r/slimit_req zone=api burst=20 nodelaygzip on; gzip_types text/plain application/json application/javascript text/css; gzip_min_length 256;proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";add_header X-Frame-Options DENYX-Content-Type-Options nosniffStrict-Transport-Security "max-age=31536000; includeSubDomains"location ~* \.(js|css|png|jpg|woff2)$ { expires 1y; add_header Cache-Control "public, immutable"; }location /health { access_log off; return 200 "ok"; }proxy_next_upstream error timeout http_502 http_503max_fails=3 fail_timeout=30sifmaptry_filesproxy_buffering offserver_tokens onserver_tokens offclient_max_body_size