# nginx configuration for Personal Activity Index # This file provides a basic reverse proxy setup for pai serve server { listen 80; server_name localhost; # For a custom domain, replace localhost with your domain and add SSL configuration: # listen 443 ssl http2; # ssl_certificate /path/to/cert.pem; # ssl_certificate_key /path/to/key.pem; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Optional: Add response headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-Content-Type-Options "nosniff" always; } # Optional: Health check endpoint for load balancers location /healthz { proxy_pass http://127.0.0.1:8080/status; access_log off; } }