nginx-request-logging

Configure Nginx custom request logging, rate limiting, and error pages.

134|21|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/letta-ai/skills --skill nginx-request-logging
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nginx-request-logging
Source: https://github.com/letta-ai/skills/tree/main/ai/benchmarks/letta/terminal-bench-2/trajectory-feedback/nginx-request-logging
Command: npx skills add https://github.com/letta-ai/skills --skill nginx-request-logging

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance for configuring Nginx with custom access logs, rate-limiting zones, and static content serving, plus verification patterns.

Core Features & Use Cases

  • Custom log_format definitions in http context
  • rate limiting zone and per-location configuration
  • Server block setup and validation
  • Verification via connectivity and log inspection

Quick Start

Create a server block with a custom log format and rate limiting, then test with concurrent requests.

Frequently Asked Questions about nginx-request-logging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up custom request logging in Nginx?

Custom request logging in Nginx uses log_format definitions in the http block to specify which fields to capture, then applies them to server blocks via the access_log directive. Define your format with variables like $remote_addr, $request, $status, then reference it by name in access_log statements to route logs to files.

What's the best way to implement rate limiting in Nginx?

Rate limiting in Nginx uses limit_req_zone directives in the http block to define zones with connection thresholds, then applies them via limit_req in server or location blocks. This prevents excessive requests by tracking clients and enforcing request-per-second caps, protecting backend services from overload.

Can I configure custom error pages in Nginx server blocks?

Yes, use error_page directives in server or location blocks to map HTTP status codes to custom response files or URIs. Nginx serves your custom HTML when errors occur, improving user experience and enabling branded error handling across different server contexts.

How do I validate Nginx configuration before reloading?

Run nginx -t from the command line to syntax-check your configuration file without starting or reloading the server. This catches errors in log formats, rate-limit zones, server blocks, and other directives before they impact production traffic.

Why would I use rate limiting zones instead of just limiting at the application level?

Rate limiting at the Nginx layer drops excess requests before they reach your application, reducing backend CPU and memory load. It's faster, applies uniformly across multiple backends, and protects against DDoS patterns without requiring application code changes.