Fixing Python UnicodeDecodeError in Logging Handlers - Fix ERR_CONNECTION_RESET in Chrome on Mac-Cloudflare Origin Certificate Setup for Apache

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