mcpField
N
nginx-configuration

nginx-configuration

github.com/aj-geddesCloud & DevOps3731.5k installsUpdated 34w ago
Repository

About nginx-configuration

A skill for configuring Nginx in web server and infrastructure setups. It covers reverse proxying, load balancing, TLS, caching, routing, and production practices.

Key features

  1. 01Reverse proxy configuration
  2. 02Load balancing
  3. 03TLS termination
  4. 04Caching and compression
  5. 05Routing and rate limiting

Use cases

  1. 01Routing requests to backend services
  2. 02Balancing traffic across backends
  3. 03Configuring HTTPS and caching

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill nginx-configuration

After installing, type/nginx-configurationin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
https-server-with-load-balancing.md
nginx-configuration-script.md
nginx-monitoring-configuration.md
production-nginx-configuration.md
scripts/
validate-api.sh
templates/
api-scaffold.yaml

Details

From the project README

Nginx Configuration

Table of Contents

Overview

Master Nginx configuration for production-grade web servers, reverse proxies, load balancing, SSL termination, caching, and API gateway patterns with advanced performance tuning.

When to Use

  • Reverse proxy setup
  • Load balancing between backend services
  • SSL/TLS termination
  • HTTP/2 and gRPC support
  • Caching and compression
  • Rate limiting and DDoS protection
  • URL rewriting and routing
  • API gateway functionality

Quick Start

Minimal working example:

# /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
worker_rlimit_nofile 65535;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

events {
    worker_connections 4096;
    use epoll;
    multi_accept on;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    # Logging
    log_format main '$remote_addr - $remote_user [$time_local] "$request" '
                    '$status $body_bytes_sent "$http_referer" '
                    '"$http_user_agent" "$http_x_forwarded_for"';

    log_format upstream_time '$remote_addr - $remote_user [$time_local] '
                            '"$request" $status $body_bytes_sent '
                            '"$http_referer" "$http_user_agent" '
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Production Nginx ConfigurationProduction Nginx Configuration
HTTPS Server with Load BalancingHTTPS Server with Load Balancing
Nginx Configuration ScriptNginx Configuration Script
Nginx Monitoring ConfigurationNginx Monitoring Configuration

Best Practices

✅ DO
  • Use HTTP/2 for performance
  • Enable SSL/TLS with strong ciphers
  • Implement proper caching strategies
  • Use upstream connection pooling
  • Monitor with stub_status or prometheus
  • Rate limit to prevent abuse
  • Add security headers
  • Use least_conn load balancing
  • Keep error logs separate from access logs
❌ DON'T
  • Disable gzip compression
  • Use weak SSL ciphers
  • Cache authenticated responses
  • Allow direct access to backends
  • Ignore upstream health checks
  • Mix HTTP and HTTPS without redirect
  • Use default error pages in production
  • Cache sensitive user data

Comments

Markdown supported