1,以域名为匹配,指向一个组集群
<VirtualHost 10.123.98.57:80> DocumentRoot /var/www/html/ ServerName www.yourdomain.cn ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/general_%Y%m%d_80_error_log 86400 480" CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/general_%Y%m%d_80_access_log 86400 480" common <Directory /> RewriteEngine On RedirectMatch ^/$ /wcsweb # Redirect console to not exists page RewriteCond %{REQUEST_URI} ^/console RewriteRule ^(.*)$ /404.jsp [L] RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] </Directory> <IfModule mod_weblogic.c> WebLogicCluster 10.123.98.40:8002,10.123.98.41:8003 MatchExpression * MatchExpression *.* </IfModule> </VirtualHost>
2,以域名后面的目录为匹配,可以指向多组集群
<VirtualHost 10.123.98.57:80> DocumentRoot /var/www/html/ ServerName www.yourdomain.cn ErrorLog "| /usr/sbin/rotatelogs /var/log/httpd/general_%Y%m%d_80_error_log 86400 480" CustomLog "| /usr/sbin/rotatelogs /var/log/httpd/general_%Y%m%d_80_access_log 86400 480" common <Directory /> RewriteEngine On RedirectMatch ^/$ /wcsweb # Redirect console to not exists page RewriteCond %{REQUEST_URI} ^/console RewriteRule ^(.*)$ /404.jsp [L] RewriteCond %{REQUEST_METHOD} ^TRACE RewriteRule .* - [F] </Directory> <Location /wcsweb> SetHandler weblogic-handler WebLogicCluster 10.123.98.40:8002,10.123.98.41:8003 MatchExpression * MatchExpression *.* </Location> <Location /component_lib> SetHandler weblogic-handler WebLogicCluster 10.123.98.42:8002,10.123.98.43:8003 MatchExpression * MatchExpression *.* </Location> </VirtualHost>
Leave a Reply