Apache正向代理与反向代理配置教程



Apache正向代理与反向代理配置教程。正向代理示例配置:

  1. ProxyRequests On
  2. ProxyVia On
  3. <Proxy *>
  4. Order deny,allow
  5. Deny from all
  6. Allow from 192.168.0
  7. </Proxy>
  8. CacheEnable disk /
  9. CacheRoot “/var/cache/mod_proxy”

反向代理示例配置:

  1. ProxyRequests Off
  2. <Proxy *>
  3. Order deny,allow
  4. Allow from all
  5. </Proxy>
  6. ProxyPass /centos http://www.centos.bz
  7. ProxyPassReverse /centos http://www.centos.bz