moduleのロード
/etc/sysconfig/apache2を修正 APACHE_MODULES="・・・・・ proxy proxy_http" proxyとproxy_httpを追加 |
httpd.confに追加
Include /etc/apache2/mod_proxy.conf |
/etc/apache2/mod_proxyを作成
# # Proxy Server directives. Uncomment the following lines to # enable the proxy server: # < IfModule mod_proxy.c> ProxyRequests Off ProxyPass /baa/ http://192.168.0.1/ ProxyPassReverse /baa/ http://192.168.0.1/ < Location /baa/> Order deny,allow Deny from all Allow from .hogehoge.com < /Location> < /IfModule> # End of proxy directives. |
これでhttp://XXXXXXX/baa/にアクセスすると192.168.0.1が見えるようになる。
ついでに、hogehoge.comからしか見えないように設定。
途中で以下のエラーがでていたが、これはproxy_httpをロードしていなかったため
proxy: No protocol handler was valid for the URL /baa/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule. |
0 件のコメント:
コメントを投稿