$ recombobulate _
home / tips / ask-claude-to-generate-web-server-configs-from-your-applications-route-structure
191

Ask Claude to Generate Web Server Configs from Your Application's Route Structure

recombobulate @recombobulate · Mar 29, 2026 · Workflows
ask-claude-to-generate-web-server-configs-from-your-applications-route-structure

Web server configs are deceptively complex — one wrong directive and your API returns HTML, your static files 404, or your websockets don't connect. Claude reads your application's actual structure and generates a config that matches.

Read my application's routes, static asset paths, and API endpoints. 
Generate an nginx config that handles reverse proxying to the app server, 
serves static files directly, and adds proper caching headers.

Claude checks your route file, public directory, and framework conventions to produce a config that works on the first try:

# Claude generates framework-aware nginx configs
server {
    listen 443 ssl;
    root /var/www/app/public;

    # Static assets with long cache
    location /assets/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }

    # API routes to the app server
    location /api/ {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
    }

    # SPA fallback for client-side routing
    location / {
        try_files $uri $uri/ /index.html;
    }
}

Target specific server configuration needs:

# Debug a broken config
My nginx returns 502 for API routes but serves static files fine. 
Read my current nginx.conf and the app's route structure — 
what's misconfigured?

# Add WebSocket support
The app uses WebSockets for real-time features. Update the nginx 
config to properly proxy WebSocket connections.

# Set up SSL with Let's Encrypt
Generate a complete nginx config with SSL using certbot paths. 
Include proper security headers and redirect HTTP to HTTPS.

# Multi-app hosting
I have three apps on this server — a React frontend, a Node API, 
and an admin panel. Generate an nginx config that routes to each 
based on subdomain.

After generating, ask Claude to validate the config:

Check this nginx config for common mistakes — missing semicolons, 
conflicting location blocks, missing proxy headers, and security 
headers that should be present.

Web server configs are infrastructure-as-code that nobody tests — let Claude generate them from your actual app structure so the routing matches reality.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Run Claude Code in GitHub Actions to Automatically Review Every Pull Request

Set up Claude Code as an automated reviewer in your CI pipeline — on every pull request, it reads the diff, checks for bugs, security issues, missing tests, and convention violations, then posts its findings as a PR comment. Your human reviewers get a head start because the obvious issues are already flagged before they look.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Build a Deployment Checklist from Your Actual Infrastructure

Before deploying, tell Claude to read your project — migrations, environment variables, queue workers, scheduled tasks, caching, third-party integrations — and generate a deployment checklist that's specific to your app. Not a generic "did you run migrations?" list, but one that knows YOUR infrastructure and catches the things YOUR deploy can break.

recombobulate @recombobulate · 1 day ago
0
Ask Claude to Generate a README from Your Actual Codebase — Not a Template

Instead of writing a README from memory or copying a template, tell Claude to read your project and generate one that's actually accurate — real setup instructions from your config, real architecture from your directory structure, real API examples from your routes, and real prerequisites from your dependency files.

recombobulate @recombobulate · 1 day ago