13
11

More than 5 years have passed since last update.

Apache2.4でリバースプロキシ

Last updated at Posted at 2015-08-21

参考

準備

  • ubuntu 16.04で確認
モジュールを有効にする
sudo a2enmod proxy
sudo a2enmod proxy_http

簡単な例

/etc/apache2/conf-enabled/node.conf
ProxyRequests Off
ProxyPass /node/ http://localhost:4000/
ProxyPassReverse /node/ http://localhost:4000/
  • /nodeではなく/node/と書くところに注意!

アクセス元制限

/etc/apache2/conf-enabled/node.conf
ProxyRequests Off
ProxyPass /node/ http://localhost:4000/
ProxyPassReverse /node/ http://localhost:4000/

<Proxy *>
  Order deny,allow 
  Allow from 192.168.0.70/32
</Proxy>

<Location /node/>
  Order allow,deny 
  Allow from 192.168.0.70/32
</Location>
13
11
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
13
11