Skip to main content
7BBusyBoss

Nginx production config

A production-grade Nginx server block — HTTPS, HTTP/2, caching, gzip, security headers.

Sane defaults that don't leak server version or accept dangerous methods.

DevOps & SREnginxconfig

The prompt

Copy this into ChatGPT, Claude, Gemini or any assistant you already use — then paste your own domain + upstream + what kind of app underneath it.

Generate an Nginx server block. Include:

- Listen 443 SSL HTTP/2 + redirect 80→443
- SSL config (TLS 1.3 + 1.2 only, modern ciphers)
- Security headers (HSTS preload, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, CSP basic)
- Gzip + brotli for text types
- Cache headers per location
- Proxy_pass to upstream with timeouts + keepalive
- Block dangerous methods
- Log format (JSON)

Output the config file + 1-line comment per directive.

Rules:
- No `server_tokens on;`.
- Modern TLS only.
- Don't allow PUT/DELETE if not needed.

Or run it here

0/8000
Output will appear here after you click Run.
Or run in your favourite chatbot

Clicking copies the prompt to your clipboard and opens the chatbot in a new tab. Gemini doesn't accept URL params — paste manually with Ctrl/Cmd+V.

Browse the full free AI prompt library or see more devops & sre prompts.