Fix 'Externally Managed Environment' Error on Linux - Troubleshooting Nginx -t Upstream Failures-Cloudflare 522 Error After Server Migration: Fixes That Work

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