The Internet <-> nginx(リバースプロキシ) <-> nginx(Webサーバ) という構成で、Web サーバ側のアクセスログを見ると、 リバースプロキシの IP だけが並んでいて、がっかりします。 そこでアクセス元の IPアドレスを正しく通知するように設定します。 手順としては 1. リバースプロキシ側の nginx で "X-Forwarded-For" というヘッダを追加。 2. Webサーバ側で、"X-Forwarded-For" の値をクライアントの IPアドレスとして使用するように設定。 3. リバースプロキシと Webサーバの nginx を再起動。 Apache なら mod-rpaf で出来るそうですが、今回は nginx なので HttpRealipModule を使います。 まずは、Webサーバ側のの nginx に HttpRealipModul