Fix Chrome ERR_CONNECTION_RESET After Router Reboot - Recover from Detached HEAD in IntelliJ IDEA-Troubleshooting Nginx 502 Bad Gateway Socket Errors

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.