LoginSignup
120
119

More than 5 years have passed since last update.

Apache 2.4 で リバースプロキシの設定

Last updated at Posted at 2015-10-09

はじめに

  • 古めの記事でリバースプロキシの設定をしてる記事が多いが、最近はだれもやってない?or当たり前なのか、Apache 2.4での設定方法のメモ

httpd.conf

設定は、Apacheで受けたhttpリクエストすべてを別のサーバに転送する設定

以下のモジュールのコメントアウトを外す

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

最終行などの空いてるところに以下を追加

ProxyRequests Off
ProxyPass / http://test1.com/
ProxyPassReverse / http://test1.com/

ProxyRequests

  • リバースプロキシだけならOffに。フォワードプロキシならOnにしておくこと。

ProxyPass

ProxyPassReverse

  • リダイレクトされたときにどこをルートとして持つかの設定と解釈しているが、参考のページを見てくれた方がいい。

参考

120
119
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
120
119