Windows + Apache2.4でリバースプロキシ
いろいろなサイトに多謝
eclipse + WTP (Tomcat7)に対して単純なリバースプロキシを仕掛ける。
ポート違い。
http://xxx.reverse.proxy:8999/sampleAPP
に対するリクエストを
http://localhost:8090/sampleAPP
に飛ばす。
バージョン
Apache2.4.12
1.httpd.conf修正
モジュール読み込みのコメントアウトを外す
138行目
LoadModule proxy_module modules/mod_proxy.so
146行目
LoadModule proxy_http_module modules/mod_proxy_http.so
492行目
Include conf/extra/httpd-vhosts.conf
2.httpd-vhosts.conf修正
もともとの記載を参考に、以下を追加
(ほかにもともと書いてあったものはコメントアウトした)
ServerAdmin webmaster@dummy-host.example.com DocumentRoot "C:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sampleAPP" ServerName xxx.reverse.proxy ServerAlias www.dummy-host.example.com ErrorLog "logs/xxx.reverse.proxy-error.log" CustomLog "logs/xxx.reverse.proxy-access.log" common AllowOverride All Require all granted ProxyPass /sampleAPP http://localhost:8090/sampleAPP/
これで終わりじゃないけどここまでくるのも結構時間がかかった…。