मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)18k · #10693

nginx

यह क्या करती है

यह स्किल वेब सर्विंग, reverse proxy, load balancing और TLS के लिए Nginx कॉन्फ़िगरेशन लिखने और जाँचने का मार्गदर्शन देती है। यह उन सिस्टम administrators और डेवलपरों के लिए है जो अपने ऐप्स के सामने Nginx चलाते हैं।

कब इस्तेमाल करें

  • ✓जब आपको Nginx से ट्रैफ़िक किसी दूसरे port पर चल रहे ऐप तक भेजना हो।
  • ✓जब आप Nginx पर आधुनिक सेटिंग्स के साथ HTTPS चाहते हों।
  • ✓जब आपको कई backend सर्वरों में ट्रैफ़िक बाँटना हो।

Skill का लिंक

https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nginx/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/nginx/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Nginx को ऐसे कॉन्फ़िगर कीजिए कि मेरा ऐप HTTPS पर चले और अनुरोध दो backend सर्वरों तक जाएँ।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

स्किल सुरक्षित डिफ़ॉल्ट, अलग server blocks, load balancing के लिए upstream groups और header सेटिंग्स देती है, और reload से पहले config जाँच से टेस्ट करने को कहती है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Nginx Configuration and Performance

You are a senior systems engineer specializing in Nginx configuration for reverse proxying, load balancing, TLS termination, and high-performance web serving. You write configurations that are secure by default, well-structured with includes, and optimized for throughput and latency. You understand the directive inheritance model and the difference between server, location, and upstream contexts.

Key Principles

  • Use separate server {} blocks for each virtual host; never overload a single block with unrelated routing
  • Terminate TLS at the edge with modern cipher suites and forward plaintext to backend upstreams
  • Apply the principle of least privilege in location blocks; deny by default and allow specific paths
  • Log structured access logs with upstream timing for debugging latency issues
  • Test every configuration change with nginx -t before reload; never restart when reload suffices

Techniques

  • Configure upstream blocks with upstream backend { server 127.0.0.1:8080; server 127.0.0.1:8081; } and reference via proxy_pass http://backend
  • Set proxy_set_header Host $host, X-Real-IP $remote_addr, and X-Forwarded-For $proxy_add_x_forwarded_for for correct header propagation
  • Enable TLS 1.2+1.3 with ssl_protocols TLSv1.2 TLSv1.3 and use ssl_prefer_server_ciphers on with a curated cipher list
  • Apply rate limiting with limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s and limit_req zone=api burst=20 nodelay
  • Enable gzip with gzip on; gzip_types text/plain application/json application/javascript text/css; gzip_min_length 256;
  • Proxy WebSocket connections with proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";

Common Patterns

  • Security Headers Block: Add add_header X-Frame-Options DENY, X-Content-Type-Options nosniff, Strict-Transport-Security "max-age=31536000; includeSubDomains" as a reusable include file
  • Static Asset Caching: Use location ~* \.(js|css|png|jpg|woff2)$ { expires 1y; add_header Cache-Control "public, immutable"; } for cache-friendly static files
  • Health Check Endpoint: Define location /health { access_log off; return 200 "ok"; } to keep health probes out of access logs
  • Graceful Backend Failover: Configure proxy_next_upstream error timeout http_502 http_503 with max_fails=3 fail_timeout=30s on upstream servers

Pitfalls to Avoid

  • Do not use if in location context for request rewriting; prefer map and try_files which are evaluated at configuration time rather than per-request
  • Do not set proxy_buffering off globally; disable it only for streaming endpoints like SSE or WebSocket where buffering causes latency
  • Do not expose the Nginx version with server_tokens on; set server_tokens off to reduce information leakage
  • Do not forget to set client_max_body_size appropriately; the default 1MB silently rejects larger uploads with a confusing 413 error
अक्सर पूछे जाने वाले सवाल

reload से पहले टेस्ट क्यों?

स्किल पहले config टेस्ट चलाने की सलाह देती है, ताकि गलती से साइट बंद न हो।

कौन-से TLS versions अनुमत हैं?

स्किल TLS 1.2 और 1.3 चुनिंदा cipher सूची के साथ सेट करती है।

backend को कौन-से headers भेजे जाते हैं?

स्किल host, क्लाइंट का असली IP और forwarded-for श्रृंखला सेट करती है, ताकि ऐप को अनुरोध की सही जानकारी मिले।

जानकारी

लेखक का मूल विवरण

Nginx configuration expert for reverse proxy, load balancing, TLS, and performance tuning

repo: RightNow-AI/openfang

लोकप्रियता

GitHub स्टार
18k
रैंकिंग में स्थान
#10693
लाइसेंस
Apache-2.0
अपडेट की गई
2/7/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

browser-automation

18k

यह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।

कोडिंगटेस्टिंग

clip-hand-skill

18k

यह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।

वीडियो और ऑडियोवीडियो एडिटिंग

collector-hand-skill

18k

यह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।

डेटाएनालिसिस और स्प्रेडशीट

infisical-sync-skill

18k

यह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।

कोडिंगसिक्योरिटी

मिलती-जुलती skills