打开apache安装目录的conf文件夹下的httpd.conf
1、将以下两行前的注释字符 # 去掉:
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
2、在httpd.conf 文件的最后加上转发规则
例如:
ProxyPass /cas http://192.168.0.206:9090/cas
ProxyPassReverse /cas http://192.168.0.206:9090/cas
将/cas开头的请求转发到206服务器9090端口的cas上
依次类推,其他的转发也是通过这种方式设置,如:
ProxyPass /cas http://192.168.0.206:9090/cas
ProxyPassReverse /cas http://192.168.0.206:9090/cas
ProxyPass /aip http://192.168.0.206:9090/aip
ProxyPassReverse /aip http://192.168.0.206:9090/aip
ProxyPass /eagle http://192.168.0.206:8080/eagle
ProxyPassReverse /eagle http://192.168.0.206:8080/eagle
ProxyPass /idap http://192.168.0.155:6060/idap
ProxyPassReverse /idap http://192.168.0.155:6060/idap
#bbs不转发,采用apache处理
ProxyPass /bbs !
ProxyPassReverse /bbs !