Skip to content

Nuface Blog

隨意隨手記 Casual Notes

Menu
  • Home
  • About
  • Services
  • Blog
  • Contact
  • Privacy Policy
  • Login
Menu

Category: Apache

About Apache

Using Apache 2.4 on AWS as a Reverse Proxy: Debugging 502s & Hardening in Practice (with vhost-scoped logs and rotatelogs)

Posted on 2025-11-052025-11-05 by Rico

This post summarizes a real troubleshooting session; all company/domain details are anonymized.Example domains use demodomain.com, e.g., wmsadmin.demodomain.com. Architecture Overview Typical vhost (simplified): Symptom Troubleshooting Flow (quick checklist) Raise timeouts only on long-running paths Avoid setting a huge global timeout that can tie up workers. Relax timeouts per URI: If mod_reqtimeout is enabled, prevent slow uploads…

Read more

在 AWS 上用 Apache 2.4 做反向代理:502 問題排查與實戰調校(含 vhost 分檔與 rotatelogs)

Posted on 2025-11-052025-11-05 by Rico

本文整理自一段真實排查經驗,所有公司與網域資訊已去識別化。範例網域以 demodomain.com 表示,例如 wmsadmin.demodomain.com。 架構概述 典型 vhost(簡化示意): 問題現象 排查思路(速查) 針對長耗時路徑「差異化」放寬 timeout 不要全站一刀切放到很長,避免把 worker 綁死;只對特定 URI 提高 timeout: 若有啟用 mod_reqtimeout,避免慢速上傳被切斷: 如何判讀「滿版的 trace 訊息」? 看到像這樣的行: 代表只是 偵錯等級很高時,Apache 把上游回應 header 與傳輸流程寫進 error log。不是錯誤。要看真正異常,請降回 LogLevel warn,或在 access log 先找 502 再對照 error log 該時段的 warn/error 級別訊息。 vhost 各自分檔記錄(擺脫 other_vhosts_access.log) 在每個 vhost 內指定 ErrorLog/CustomLog,最簡單: 如不想再用全域 other_vhosts_access.log,可停用: (注意:停用後,沒自訂 CustomLog 的 vhost…

Read more

Recent Posts

  • Enable Logrotate for Dovecot in Docker: Prevent Huge Log Files and Disk Overflow
  • 在 Docker Dovecot 中啟用 Logrotate:避免 log 爆量、磁碟被塞滿的最佳做法
  • How to Choose Suricata RuleSets on OPNsense — Practical Guide & Best Recommendations
  • OPNsense Suricata 使用指南 — 規則(RuleSets)該怎麼選?最佳實務與推薦設定
  • Proxmox VE + Proxmox Backup Server Integration & Cross-Node Restore Guide

Recent Comments

No comments to show.

Archives

  • November 2025
  • October 2025

Categories

  • AI
  • Apache
  • Cybersecurity
  • Database
  • DNS
  • Docker
  • Fail2Ban
  • FileSystem
  • Firewall
  • Linux
  • LLM
  • Mail
  • N8N
  • OpenLdap
  • OPNsense
  • PHP
  • QoS
  • Samba
  • Switch
  • Virtualization
  • VPN
  • WordPress
© 2025 Nuface Blog | Powered by Superbs Personal Blog theme