
How a Hardcoded IP Silently Killed External Access — A Vite + Nginx Cautionary Tale
How a Hardcoded IP Silently Killed External Access — A Vite + Nginx Cautionary Tale A hardcoded private IP address buried in frontend code completely broke external access. Here's the full investigation, fix, and deployment journey. Background We needed to make our internal business system (Vite + React frontend + Express backend) accessible from external networks via erp.example.com . Everything worked perfectly within the LAN, but external access simply wouldn't function. The Configuration Problem We Discovered Investigation revealed this setup: erp.example.com nginx configuration: /api/ → 127.0.0.1:3210 (backend) ✅ / → 127.0.0.1:3101 (frontend) ❌ — Nothing was running on this port The frontend was actually served by a vite dev server (port 3101) on a different machine — accessible only within LAN Essentially, the development vite dev server was being used as the "production" service. The Real Killer: Hardcoded IPs The bigger problem was private IP addresses hardcoded throughout the
Continue reading on Dev.to
Opens in a new tab


