1、双击安装刚下载的Apache HTTP Server安装文件,按照安装向导安装完成后,软件会自动运行,如果端口不被占用,会启动成功,例如,在浏览器输入http://localhost或者http://localhost:8080,回车。如果出现ItWorks!字样,说明已经安装成功了。
2、要配置反向代理,首先,找到我们刚才安装的Apache HTTP Server根目录,
3、进入conf,找到httpd.conf配置文件,在大概110行,LoadModuleproxy_module modules/mo颊俄岿髭d_proxy.soLoadModuleproxy_ajp_modulemodules/mod_proxy_ajp.soLoadModuleproxy_balancer_modulemodules/mod_proxy_balancer.soLoadModuleproxy_connect_modulemodules/mod_proxy_connect.soLoadModuleproxy_ftp_modulemodules/mod_proxy_ftp.soLoadModuleproxy_http_modulemodules/mod_proxy_http.so将这些注释打开,即去掉前面的#;然后,还是在这个文件的471行,Include conf/extra/httpd-vhosts.conf将注释打开;
4、打开,修改里面的配置;NameVirtualHost *:80[A1]<VirtualHost *:80>[A2]ServerAdmin [email protected] "d:/www/test"ServerName test.orientsec.comServerAlias test.orientsec.comErrorLog "logs/test-error.log"CustomLog "logs/test-access.log"commonProxyPass /images/ !ProxyPass/js/ !ProxyPass/css/ !ProxyPass/wiki http://hdwiki.orientsec.com/wiki.html max=20 ttl=120 retry=300ProxyPassReverse/wiki http://hdwiki.orientsec.com/wiki.html</VirtualHost><VirtualHost *:80>ServerAdmin [email protected] "d:/www/hdwiki"ServerName hdwiki.orientsec.comServerAlias hdwiki.orientsec.comErrorLog "logs/hdwiki-error.log"CustomLog "logs/hdwiki-access.log"common</VirtualHost>找到conf/httpd.conf里面的< Directory>标签修改权限配置,否则会一直拒绝访问,需要登录验证。Allow from none改为:Allow from all最后,重启Apache HTTP Server;
5、负载均衡ProxyPass / balancer://orientsec.com.cn/ProxyPassReverse/ balancer://orientsec.com.cn /<Proxy balancer://orientsec.com.cn/>BalancerMember http://localhost:8085/BalancerMemberhttp://localhost:8086/</Proxy>