apache配置反向代理

http.conf

去掉前面的#号

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

然后在vhosts.conf配置文件里加入如下代码

<VirtualHost *:80>
    DocumentRoot "D:\webser\www"
    ServerName test.com
    ServerAlias 
    ErrorLog  "logs/test.com.error.log"
    CustomLog "logs/test.com.access.log" common
  <Directory "D:\webser\www">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
  ProxyPass / http://123.123.123.123:565/
  ProxyPassReverse / http://123.123.123.123:565/
</VirtualHost>

 

posted @ 2015-05-07 09:35  神马和浮云  阅读(645)  评论(0编辑  收藏  举报