Posted on 2007-04-27 16:54
ZelluX 阅读(630)
评论(0) 编辑 收藏 所属分类:
OOP
zz的
(1) 打开conf\httpd.conf文件将以下字段前的注释(”#”)去除
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
(2) 在conf\httpd.conf文件的末尾添加以下内容:
ProxyRequests Off
ProxyPass /admin balancer://tomcatcluster/admin lbmethod=byrequests stickysession=JSESSIONID nofailover=Off timeout=5 maxattempts=3
ProxyPassReverse /admin balancer://tomcatcluster/admin
<Proxy balancer://tomcatcluster>
BalancerMember ajp://localhost:8009 route=tomcat8080
BalancerMember ajp://localhost:10009 smax=10 route=tomcat10080
BalancerMember ajp://localhost:11009 route=tomcat11080
BalancerMember ajp://localhost:12009 smax=10 route=tomcat12080
</Proxy>
(3) 找到以下内容
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
将第二行前面的”#”去除.
(4) 打开conf/extra/httpd-vhosts.conf文件,在文件末尾添加以下内容:
<VirtualHost *:80>
ServerAdmin 127.0.0.1
DocumentRoot "D:\Program Files\Apache oftware Foundation\Tomcat 5.5\webapps"
ServerName 127.0.0.1
ErrorLog logs/127.0.0.1_error_log
CustomLog logs/dummy-127.0.0.1-access_log common
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
ServerName localhost
ServerAlias 127.0.0.1
</VirtualHost>