Weblogic加Apache的群集配置

本文直接从简了,直接对配置文件进行说明了。

首先,我们要保证我们的weblogic 和apache 服务都已经正常可用了。

1、新增配置 weblogic.xml

为了支持session复制,为应用程序新建weblogic.xml文件,和项目的 web.xml 放在一起,内容如下:

[html]  view plain  copy
  1. <span style="font-family:'Courier New';font-size:12px;"><?xml version="1.0" encoding="UTF-8"?>  
  2. <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.5/weblogic-web-app.xsd">  
  3.     <wls:weblogic-version>12.1.2</wls:weblogic-version>  
  4.     <wls:context-root>/</wls:context-root>  
  5.     <wls:charset-params>  
  6.         <wls:input-charset>  
  7.             <wls:resource-path>/</wls:resource-path>  
  8.             <wls:java-charset-name>UTF-8</wls:java-charset-name>  
  9.         </wls:input-charset>  
  10.     </wls:charset-params>  
  11.     <wls:container-descriptor>  
  12.         <!-- <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> -->  
  13.         <wls:prefer-application-packages>  
  14.             <wls:package-name>javax.ws.rs.*</wls:package-name>  
  15.         </wls:prefer-application-packages>  
  16.     </wls:container-descriptor>  
  17.     <wls:jsp-descriptor>  
  18.         <wls:page-check-seconds>5</wls:page-check-seconds>  
  19.     </wls:jsp-descriptor>  
  20.     <wls:session-descriptor>  
  21.         <wls:timeout-secs>7200</wls:timeout-secs>  
  22.         <wls:cookie-name>WSESSIONID</wls:cookie-name>  
  23.         <wls:persistent-store-type>replicated_if_clustered</wls:persistent-store-type>  
  24.     </wls:session-descriptor>  
  25. </wls:weblogic-web-app></span>  


2、配置apache

复制weblogic 的 mod_wl_22.so 到 apache/module 目录下。

修改httpd.conf文件,增加如下内容:

[html]  view plain  copy
  1. <span style="font-family:'Courier New';font-size:12px;"><VirtualHost *:80>  
  2.     DocumentRoot "/svcrootStg/runtime/webstatic/MobileWAP-Backoffice"  
  3.     ServerName stgm.test.com.cn  
  4.     #    ServerName www.test.com.cn  
  5.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgm-error_log.%m%d 86400"  
  6.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgm-access_log.%m%d 86400" common  
  7.     <IfModule mod_weblogic.c>  
  8.         WebLogicCluster 52.208.110.181:8101,52.208.110.182:8101  
  9.         #WebLogicHost cgvch-doap  
  10.         #WebLogicPort 8211  
  11.         WLCookieName MJSESSIONID  
  12.         MatchExpression */controller/*  
  13.         MatchExpression *.jsp  
  14.         MatchExpression *.fo  
  15.         MatchExpression */ws/*  
  16.         ConnectTimeoutSecs 4  
  17.         ConnectRetrySecs 2  
  18.         DynamicServerList ON  
  19.         Idempotent OFF  
  20.         WLIOTimeoutSecs 40  
  21.         Debug OFF  
  22. #       WLLogFile /tmp/wlproxy_stgm.log  
  23.     </IfModule>  
  24.     <Directory "/svcrootStg/runtime/webstatic/MobileWAP-Backoffice">  
  25.         AllowOverride None  
  26.         Options FollowSymLinks  
  27.    #    Options Indexes MultiViews  
  28.         Order deny,allow  
  29.         Allow from all  
  30.     </Directory>  
  31.   
  32. </VirtualHost></span>  

配置的主要意思是:处理所有80端口,并过滤ServerName,只处理 stgm.test.com.cn 的域名请求。WebLogicCluster 为多个weblogic 服务,apache 自动负载均衡转发请求。MatchExpression 配置的为转发到weblogic 的请求规则。不复合配置的规则的,都会被apache 自己处理。


3、apache案例参考

下面是一个项目的 httpd.conf 配置文件,贴出来供参考,主要看最后一段配置就好,就不进行一一解释了。

 

[html]  view plain  copy
  1. <span style="font-family:'Courier New';font-size:12px;">#  
  2. # This is the main Apache HTTP server configuration file.  It contains the  
  3. # configuration directives that give the server its instructions.  
  4. # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.  
  5. # In particular, see   
  6. <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>  
  7. # for a discussion of each configuration directive.  
  8. #  
  9. # Do NOT simply read the instructions in here without understanding  
  10. # what they do.  They're here only as hints or reminders.  If you are unsure  
  11. # consult the online docs. You have been warned.    
  12. #  
  13. # Configuration and logfile names: If the filenames you specify for many  
  14. # of the server's control files begin with "/" (or "drive:/" for Win32), the  
  15. # server will use that explicit path.  If the filenames do *not* begin  
  16. # with "/", the value of ServerRoot is prepended -- so 'log/access_log'  
  17. # with ServerRoot set to '/www' will be interpreted by the  
  18. # server as '/www/log/access_log', where as '/log/access_log' will be  
  19. # interpreted as '/log/access_log'.  
  20.   
  21. #  
  22. # ServerRoot: The top of the directory tree under which the server's  
  23. # configuration, error, and log files are kept.  
  24. #  
  25. # Do not add a slash at the end of the directory path.  If you point  
  26. # ServerRoot at a non-local disk, be sure to point the LockFile directive  
  27. # at a local disk.  If you wish to share the same ServerRoot for multiple  
  28. # httpd daemons, you will need to change at least LockFile and PidFile.  
  29. #  
  30. ServerRoot "/app/apache2"  
  31.   
  32. #  
  33. # Listen: Allows you to bind Apache to specific IP addresses and/or  
  34. # ports, instead of the default. See also the <VirtualHost>  
  35. # directive.  
  36. #  
  37. # Change this to Listen on specific IP addresses as shown below to   
  38. # prevent Apache from glomming onto all bound IP addresses.  
  39. #  
  40. #Listen 12.34.56.78:80  
  41. Listen 80  
  42.   
  43. #  
  44. # Dynamic Shared Object (DSO) Support  
  45. #  
  46. # To be able to use the functionality of a module which was built as a DSO you  
  47. # have to place corresponding `LoadModule' lines at this location so the  
  48. # directives contained in it are actually available _before_ they are used.  
  49. # Statically compiled modules (those listed by `httpd -l') do not need  
  50. # to be loaded here.  
  51. #  
  52. # Example:  
  53. # LoadModule foo_module modules/mod_foo.so  
  54. #  
  55.   
  56. <IfModule !mpm_netware_module>  
  57. <IfModule !mpm_winnt_module>  
  58. #  
  59. # If you wish httpd to run as a different user or group, you must run  
  60. # httpd as root initially and it will switch.    
  61. #  
  62. # User/Group: The name (or #number) of the user/group to run httpd as.  
  63. # It is usually good practice to create a dedicated user and group for  
  64. # running httpd, as with most system services.  
  65. #  
  66. User daemon  
  67. Group daemon  
  68.   
  69. </IfModule>  
  70. </IfModule>  
  71.   
  72. # 'Main' server configuration  
  73. #  
  74. # The directives in this section set up the values used by the 'main'  
  75. # server, which responds to any requests that aren't handled by a  
  76. <VirtualHost> definition.  These values also provide defaults for  
  77. # any <VirtualHost> containers you may define later in the file.  
  78. #  
  79. # All of these directives may appear inside <VirtualHost> containers,  
  80. # in which case these default settings will be overridden for the  
  81. # virtual host being defined.  
  82. #  
  83.   
  84. #  
  85. # ServerAdmin: Your address, where problems with the server should be  
  86. # e-mailed.  This address appears on some server-generated pages, such  
  87. # as error documents.  e.g. admin@your-domain.com  
  88. #  
  89. ServerAdmin you@example.com  
  90.   
  91. #  
  92. # ServerName gives the name and port that the server uses to identify itself.  
  93. # This can often be determined automatically, but we recommend you specify  
  94. # it explicitly to prevent problems during startup.  
  95. #  
  96. # If your host doesn't have a registered DNS name, enter its IP address here.  
  97. #  
  98. ServerName testch-doap:80  
  99.   
  100. #  
  101. # DocumentRoot: The directory out of which you will serve your  
  102. # documents. By default, all requests are taken from this directory, but  
  103. # symbolic links and aliases may be used to point to other locations.  
  104. #  
  105. DocumentRoot "/app/apache2/htdocs"  
  106.   
  107. #  
  108. # Each directory to which Apache has access can be configured with respect  
  109. # to which services and features are allowed and/or disabled in that  
  110. # directory (and its subdirectories).   
  111. #  
  112. # First, we configure the "default" to be a very restrictive set of   
  113. # features.    
  114. #  
  115. <Directory />  
  116.     Options FollowSymLinks  
  117.     AllowOverride None  
  118.     Order deny,allow  
  119.     Deny from all  
  120. </Directory>  
  121.   
  122. #  
  123. # Note that from this point forward you must specifically allow  
  124. # particular features to be enabled - so if something's not working as  
  125. # you might expect, make sure that you have specifically enabled it  
  126. # below.  
  127. #  
  128.   
  129. #  
  130. # This should be changed to whatever you set DocumentRoot to.  
  131. #  
  132. <Directory "/app/apache2/htdocs">  
  133.     #  
  134.     # Possible values for the Options directive are "None", "All",  
  135.     # or any combination of:  
  136.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews  
  137.     #  
  138.     # Note that "MultiViews" must be named *explicitly* --- "Options All"  
  139.     # doesn't give it to you.  
  140.     #  
  141.     # The Options directive is both complicated and important.  Please see  
  142.     # http://httpd.apache.org/docs/2.2/mod/core.html#options  
  143.     # for more information.  
  144.     #  
  145.     Options Indexes FollowSymLinks  
  146.   
  147.     #  
  148.     # AllowOverride controls what directives may be placed in .htaccess files.  
  149.     # It can be "All", "None", or any combination of the keywords:  
  150.     #   Options FileInfo AuthConfig Limit  
  151.     #  
  152.     AllowOverride None  
  153.   
  154.     #  
  155.     # Controls who can get stuff from this server.  
  156.     #  
  157.     Order allow,deny  
  158.     Allow from all  
  159.   
  160. </Directory>  
  161.   
  162. #  
  163. # DirectoryIndex: sets the file that Apache will serve if a directory  
  164. # is requested.  
  165. #  
  166. <IfModule dir_module>  
  167.     DirectoryIndex index.html  
  168. </IfModule>  
  169.   
  170. #  
  171. # The following lines prevent .htaccess and .htpasswd files from being   
  172. # viewed by Web clients.   
  173. #  
  174. <FilesMatch "^\.ht">  
  175.     Order allow,deny  
  176.     Deny from all  
  177.     Satisfy All  
  178. </FilesMatch>  
  179.   
  180. #  
  181. # ErrorLog: The location of the error log file.  
  182. # If you do not specify an ErrorLog directive within a <VirtualHost>  
  183. # container, error messages relating to that virtual host will be  
  184. # logged here.  If you *do* define an error logfile for a <VirtualHost>  
  185. # container, that host's errors will be logged there and not here.  
  186. #  
  187. ErrorLog "logs/error_log"  
  188.   
  189. #  
  190. # LogLevel: Control the number of messages logged to the error_log.  
  191. # Possible values include: debug, info, notice, warn, error, crit,  
  192. # alert, emerg.  
  193. #  
  194. LogLevel warn  
  195.   
  196. <IfModule log_config_module>  
  197.     #  
  198.     # The following directives define some format nicknames for use with  
  199.     # a CustomLog directive (see below).  
  200.     #  
  201.     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined  
  202.     LogFormat "%h %l %u %t \"%r\" %>s %b" common  
  203.   
  204.     <IfModule logio_module>  
  205.       # You need to enable mod_logio.c to use %I and %O  
  206.       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio  
  207.     </IfModule>  
  208.   
  209.     #  
  210.     # The location and format of the access logfile (Common Logfile Format).  
  211.     # If you do not define any access logfiles within a <VirtualHost>  
  212.     # container, they will be logged here.  Contrariwise, if you *do*  
  213.     # define per-<VirtualHost> access logfiles, transactions will be  
  214.     # logged therein and *not* in this file.  
  215.     #  
  216.     CustomLog "logs/access_log" common  
  217.   
  218.     #  
  219.     # If you prefer a logfile with access, agent, and referer information  
  220.     # (Combined Logfile Format) you can use the following directive.  
  221.     #  
  222.     #CustomLog "logs/access_log" combined  
  223. </IfModule>  
  224.   
  225. <IfModule alias_module>  
  226.     #  
  227.     # Redirect: Allows you to tell clients about documents that used to   
  228.     # exist in your server's namespace, but do not anymore. The client   
  229.     # will make a new request for the document at its new location.  
  230.     # Example:  
  231.     # Redirect permanent /foo http://www.example.com/bar  
  232.   
  233.     #  
  234.     # Alias: Maps web paths into filesystem paths and is used to  
  235.     # access content that does not live under the DocumentRoot.  
  236.     # Example:  
  237.     # Alias /webpath /full/filesystem/path  
  238.     #  
  239.     # If you include a trailing / on /webpath then the server will  
  240.     # require it to be present in the URL.  You will also likely  
  241.     # need to provide a <Directory> section to allow access to  
  242.     # the filesystem path.  
  243.   
  244.     #  
  245.     # ScriptAlias: This controls which directories contain server scripts.   
  246.     # ScriptAliases are essentially the same as Aliases, except that  
  247.     # documents in the target directory are treated as applications and  
  248.     # run by the server when requested rather than as documents sent to the  
  249.     # client.  The same rules about trailing "/" apply to ScriptAlias  
  250.     # directives as to Alias.  
  251.     #  
  252.     ScriptAlias /cgi-bin/ "/app/apache2/cgi-bin/"  
  253.   
  254. </IfModule>  
  255.   
  256. <IfModule cgid_module>  
  257.     #  
  258.     # ScriptSock: On threaded servers, designate the path to the UNIX  
  259.     # socket used to communicate with the CGI daemon of mod_cgid.  
  260.     #  
  261.     #Scriptsock logs/cgisock  
  262. </IfModule>  
  263.   
  264. #  
  265. # "/app/apache2/cgi-bin" should be changed to whatever your ScriptAliased  
  266. # CGI directory exists, if you have that configured.  
  267. #  
  268. <Directory "/app/apache2/cgi-bin">  
  269.     AllowOverride None  
  270.     Options None  
  271.     Order allow,deny  
  272.     Allow from all  
  273. </Directory>  
  274.   
  275. #  
  276. # DefaultType: the default MIME type the server will use for a document  
  277. # if it cannot otherwise determine one, such as from filename extensions.  
  278. # If your server contains mostly text or HTML documents, "text/plain" is  
  279. # a good value.  If most of your content is binary, such as applications  
  280. # or images, you may want to use "application/octet-stream" instead to  
  281. # keep browsers from trying to display binary files as though they are  
  282. # text.  
  283. #  
  284. DefaultType text/plain  
  285.   
  286. <IfModule mime_module>  
  287.     #  
  288.     # TypesConfig points to the file containing the list of mappings from  
  289.     # filename extension to MIME-type.  
  290.     #  
  291.     TypesConfig conf/mime.types  
  292.   
  293.     #  
  294.     # AddType allows you to add to or override the MIME configuration  
  295.     # file specified in TypesConfig for specific file types.  
  296.     #  
  297.     #AddType application/x-gzip .tgz  
  298.     #  
  299.     # AddEncoding allows you to have certain browsers uncompress  
  300.     # information on the fly. Note: Not all browsers support this.  
  301.     #  
  302.     #AddEncoding x-compress .Z  
  303.     #AddEncoding x-gzip .gz .tgz  
  304.     #  
  305.     # If the AddEncoding directives above are commented-out, then you  
  306.     # probably should define those extensions to indicate media types:  
  307.     #  
  308.     AddType application/x-compress .Z  
  309.     AddType application/x-gzip .gz .tgz  
  310.   
  311.     #  
  312.     # AddHandler allows you to map certain file extensions to "handlers":  
  313.     # actions unrelated to filetype. These can be either built into the server  
  314.     # or added with the Action directive (see below)  
  315.     #  
  316.     # To use CGI scripts outside of ScriptAliased directories:  
  317.     # (You will also need to add "ExecCGI" to the "Options" directive.)  
  318.     #  
  319.     #AddHandler cgi-script .cgi  
  320.   
  321.     # For type maps (negotiated resources):  
  322.     #AddHandler type-map var  
  323.   
  324.     #  
  325.     # Filters allow you to process content before it is sent to the client.  
  326.     #  
  327.     # To parse .shtml files for server-side includes (SSI):  
  328.     # (You will also need to add "Includes" to the "Options" directive.)  
  329.     #  
  330.     #AddType text/html .shtml  
  331.     #AddOutputFilter INCLUDES .shtml  
  332. </IfModule>  
  333.   
  334. #  
  335. # The mod_mime_magic module allows the server to use various hints from the  
  336. # contents of the file itself to determine its type.  The MIMEMagicFile  
  337. # directive tells the module where the hint definitions are located.  
  338. #  
  339. #MIMEMagicFile conf/magic  
  340.   
  341. #  
  342. # Customizable error responses come in three flavors:  
  343. # 1) plain text 2) local redirects 3) external redirects  
  344. #  
  345. # Some examples:  
  346. #ErrorDocument 500 "The server made a boo boo."  
  347. #ErrorDocument 404 /missing.html  
  348. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"  
  349. #ErrorDocument 402 http://www.example.com/subscription_info.html  
  350. #  
  351.   
  352. #  
  353. # MaxRanges: Maximum number of Ranges in a request before  
  354. # returning the entire resource, or one of the special  
  355. # values 'default', 'none' or 'unlimited'.  
  356. # Default setting is to accept 200 Ranges.  
  357. #MaxRanges unlimited  
  358.   
  359. #  
  360. # EnableMMAP and EnableSendfile: On systems that support it,   
  361. # memory-mapping or the sendfile syscall is used to deliver  
  362. # files.  This usually improves server performance, but must  
  363. # be turned off when serving from networked-mounted   
  364. # filesystems or if support for these functions is otherwise  
  365. # broken on your system.  
  366. #  
  367. #EnableMMAP off  
  368. #EnableSendfile off  
  369.   
  370. # Supplemental configuration  
  371. #  
  372. # The configuration files in the conf/extra/ directory can be   
  373. # included to add extra features or to modify the default configuration of   
  374. # the server, or you may simply copy their contents here and change as   
  375. # necessary.  
  376.   
  377. # Server-pool management (MPM specific)  
  378. #Include conf/extra/httpd-mpm.conf  
  379.   
  380. # Multi-language error messages  
  381. #Include conf/extra/httpd-multilang-errordoc.conf  
  382.   
  383. # Fancy directory listings  
  384. #Include conf/extra/httpd-autoindex.conf  
  385.   
  386. # Language settings  
  387. #Include conf/extra/httpd-languages.conf  
  388.   
  389. # User home directories  
  390. #Include conf/extra/httpd-userdir.conf  
  391.   
  392. # Real-time info on requests and configuration  
  393. #Include conf/extra/httpd-info.conf  
  394.   
  395. # Virtual hosts  
  396. #Include conf/extra/httpd-vhosts.conf  
  397.   
  398. # Local access to the Apache HTTP Server Manual  
  399. #Include conf/extra/httpd-manual.conf  
  400.   
  401. # Distributed authoring and versioning (WebDAV)  
  402. #Include conf/extra/httpd-dav.conf  
  403.   
  404. # Various default settings  
  405. #Include conf/extra/httpd-default.conf  
  406.   
  407. # Secure (SSL/TLS) connections  
  408. #Include conf/extra/httpd-ssl.conf  
  409. #  
  410. # Note: The following must must be present to support  
  411. #       starting without SSL on platforms with no /dev/random equivalent  
  412. #       but a statically compiled-in mod_ssl.  
  413. #  
  414. <IfModule ssl_module>  
  415. SSLRandomSeed startup builtin  
  416. SSLRandomSeed connect builtin  
  417. </IfModule>  
  418.   
  419. ########################################################  
  420. LoadModule weblogic_module modules/lib/mod_wl.so  
  421. ########################################################  
  422. <IfModule mpm_worker_module>  
  423.     StartServers            10  
  424.     ServerLimit            64  
  425.     MaxClients           4096  
  426.     MinSpareThreads        100  
  427.     MaxSpareThreads      4096  
  428.     ThreadsPerChild       64  
  429.     MaxRequestsPerChild   40000  
  430. </IfModule>  
  431.   
  432. Timeout 300  
  433. KeepAlive On  
  434. MaxKeepAliveRequests 100  
  435. KeepAliveTimeout 15  
  436. NameVirtualHost *:80  
  437.   
  438. <VirtualHost *:80>  
  439.     DocumentRoot "/svcroot/runtime/webstatic/Homepage-Backoffice"  
  440.     ServerName devwww.test.com.cn  
  441.     #    ServerName www.test.com.cn  
  442.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devwww-error_log.%m%d 86400"  
  443.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devwww-access_log.%m%d 86400" common  
  444.     <IfModule mod_weblogic.c>  
  445.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  446.         WebLogicHost testch-doap   
  447.         WebLogicPort 8101  
  448.         WLCookieName WWWJSESSIONID  
  449.         MatchExpression */controller/*  
  450.         MatchExpression *.jsp  
  451.         MatchExpression *.fo  
  452.         MatchExpression */ws/*  
  453.         ConnectTimeoutSecs 4  
  454.         ConnectRetrySecs 2  
  455.         DynamicServerList ON  
  456.         Idempotent OFF  
  457.         WLIOTimeoutSecs 40  
  458.         Debug OFF  
  459. #       WLLogFile /tmp/wlproxy_devwww.log  
  460.     </IfModule>  
  461.     <Directory "/svcroot/runtime/webstatic/Homepage-Backoffice">  
  462.         AllowOverride None  
  463.         Options FollowSymLinks  
  464.    #    Options Indexes MultiViews  
  465.         Order deny,allow  
  466.         Allow from all  
  467.     </Directory>  
  468.   
  469. </VirtualHost>  
  470.   
  471. <VirtualHost *:80>  
  472.     DocumentRoot "/svcroot/runtime/webstatic/MobileWAP-Backoffice"  
  473.     ServerName devm.test.com.cn  
  474.     #    ServerName www.test.com.cn  
  475.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devm-error_log.%m%d 86400"  
  476.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devm-access_log.%m%d 86400" common  
  477.     <IfModule mod_weblogic.c>  
  478.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  479.         WebLogicHost testch-doap  
  480.         WebLogicPort 8201  
  481.         WLCookieName MJSESSIONID  
  482.         MatchExpression */controller/*  
  483.         MatchExpression *.jsp  
  484.         MatchExpression *.fo  
  485.         MatchExpression */ws/*  
  486.         ConnectTimeoutSecs 4  
  487.         ConnectRetrySecs 2  
  488.         DynamicServerList ON  
  489.         Idempotent OFF  
  490.         WLIOTimeoutSecs 40  
  491.         Debug OFF  
  492. #       WLLogFile /tmp/wlproxy_devm.log  
  493.     </IfModule>  
  494.     <Directory "/svcroot/runtime/webstatic/MobileWAP-Backoffice">  
  495.         AllowOverride None  
  496.         Options FollowSymLinks  
  497.    #    Options Indexes MultiViews  
  498.         Order deny,allow  
  499.         Allow from all  
  500.     </Directory>  
  501.   
  502. </VirtualHost>  
  503.   
  504. <VirtualHost *:80>  
  505.     DocumentRoot "/svcroot/runtime/webstatic/MobileApp-Backoffice"  
  506.     ServerName devonapp.test.com.cn  
  507.     #    ServerName www.test.com.cn  
  508.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonapp-error_log.%m%d 86400"  
  509.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonapp-access_log.%m%d 86400" common  
  510.     <IfModule mod_weblogic.c>  
  511.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  512.         WebLogicHost testch-doap  
  513.         WebLogicPort 8301  
  514.         WLCookieName APPJSESSIONID  
  515.         MatchExpression */controller/*  
  516.         MatchExpression *.jsp  
  517.         MatchExpression *.fo  
  518.         MatchExpression */ws/*  
  519.         ConnectTimeoutSecs 4  
  520.         ConnectRetrySecs 2  
  521.         DynamicServerList ON  
  522.         Idempotent OFF  
  523.         WLIOTimeoutSecs 40  
  524.         Debug OFF  
  525. #       WLLogFile /tmp/wlproxy_devm.log  
  526.     </IfModule>  
  527.     <Directory "/svcroot/runtime/webstatic/MobileApp-Backoffice">  
  528.         AllowOverride None  
  529.         Options FollowSymLinks  
  530.    #    Options Indexes MultiViews  
  531.         Order deny,allow  
  532.         Allow from all  
  533.     </Directory>  
  534.   
  535. </VirtualHost>  
  536.   
  537. <VirtualHost *:80>  
  538.     DocumentRoot "/svcroot/runtime/webstatic/API-Backoffice"  
  539.     ServerName devonapi.test.com.cn  
  540.     #    ServerName www.test.com.cn  
  541.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonapi-error_log.%m%d 86400"  
  542.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonapi-access_log.%m%d 86400" common  
  543.     <IfModule mod_weblogic.c>  
  544.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  545.         WebLogicHost testch-doap  
  546.         WebLogicPort 8401  
  547.         WLCookieName APIJSESSIONID  
  548.         MatchExpression */controller/*  
  549.         MatchExpression *.jsp  
  550.         MatchExpression *.fo  
  551.         MatchExpression */ws/*  
  552.         ConnectTimeoutSecs 4  
  553.         ConnectRetrySecs 2  
  554.         DynamicServerList ON  
  555.         Idempotent OFF  
  556.         WLIOTimeoutSecs 40  
  557.         Debug OFF  
  558. #       WLLogFile /tmp/wlproxy_devwww.log  
  559.     </IfModule>  
  560.     <Directory "/svcroot/runtime/webstatic/API-Backoffice">  
  561.         AllowOverride None  
  562.         Options FollowSymLinks  
  563.    #    Options Indexes MultiViews  
  564.         Order deny,allow  
  565.         Allow from all  
  566.     </Directory>  
  567.   
  568. </VirtualHost>  
  569.   
  570. <VirtualHost *:80>  
  571.     DocumentRoot "/svcroot/runtime/webstatic/CMS-Backoffice"  
  572.     ServerName devonadm.test.com.cn  
  573.     #    ServerName www.test.com.cn  
  574.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonadm-error_log.%m%d 86400"  
  575.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/devonadm-access_log.%m%d 86400" common  
  576.     <IfModule mod_weblogic.c>  
  577.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  578.         WebLogicHost testch-doap  
  579.         WebLogicPort 8501  
  580.         WLCookieName ADMJSESSIONID  
  581.         MatchExpression */controller/*  
  582.         MatchExpression *.svl  
  583.         MatchExpression *.jsp  
  584.         MatchExpression *.fo  
  585.         MatchExpression */ws/*  
  586.         ConnectTimeoutSecs 4  
  587.         ConnectRetrySecs 2  
  588.         DynamicServerList ON  
  589.         Idempotent OFF  
  590.         WLIOTimeoutSecs 40  
  591.         Debug OFF  
  592. #       WLLogFile /tmp/wlproxy_devwww.log  
  593.     </IfModule>  
  594.     <Directory "/svcroot/runtime/webstatic/CMS-Backoffice">  
  595.         AllowOverride None  
  596.         Options FollowSymLinks  
  597.    #    Options Indexes MultiViews  
  598.         Order deny,allow  
  599.         Allow from all  
  600.     </Directory>  
  601.   
  602. </VirtualHost>  
  603.   
  604. <VirtualHost *:80>  
  605.     DocumentRoot "/svcrootStg/runtime/webstatic/Homepage-Backoffice"  
  606.     ServerName stgwww.test.com.cn  
  607.     #    ServerName www.test.com.cn  
  608.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgwww-error_log.%m%d 86400"  
  609.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgwww-access_log.%m%d 86400" common  
  610.     <IfModule mod_weblogic.c>  
  611.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  612.         WebLogicHost testch-doap  
  613.         WebLogicPort 8111  
  614.         WLCookieName WWWJSESSIONID  
  615.         MatchExpression */controller/*  
  616.         MatchExpression *.jsp  
  617.         MatchExpression *.fo  
  618.         MatchExpression */ws/*  
  619.         ConnectTimeoutSecs 4  
  620.         ConnectRetrySecs 2  
  621.         DynamicServerList ON  
  622.         Idempotent OFF  
  623.         WLIOTimeoutSecs 40  
  624.         Debug OFF  
  625. #       WLLogFile /tmp/wlproxy_stgwww.log  
  626.     </IfModule>  
  627.     <Directory "/svcrootStg/runtime/webstatic/Homepage-Backoffice">  
  628.         AllowOverride None  
  629.         Options FollowSymLinks  
  630.    #    Options Indexes MultiViews  
  631.         Order deny,allow  
  632.         Allow from all  
  633.     </Directory>  
  634.   
  635. </VirtualHost>  
  636.   
  637. <VirtualHost *:80>  
  638.     DocumentRoot "/svcrootStg/runtime/webstatic/MobileWAP-Backoffice"  
  639.     ServerName stgm.test.com.cn  
  640.     #    ServerName www.test.com.cn  
  641.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgm-error_log.%m%d 86400"  
  642.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgm-access_log.%m%d 86400" common  
  643.     <IfModule mod_weblogic.c>  
  644.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  645.         WebLogicHost testch-doap  
  646.         WebLogicPort 8211  
  647.         WLCookieName MJSESSIONID  
  648.         MatchExpression */controller/*  
  649.         MatchExpression *.jsp  
  650.         MatchExpression *.fo  
  651.         MatchExpression */ws/*  
  652.         ConnectTimeoutSecs 4  
  653.         ConnectRetrySecs 2  
  654.         DynamicServerList ON  
  655.         Idempotent OFF  
  656.         WLIOTimeoutSecs 40  
  657.         Debug OFF  
  658. #       WLLogFile /tmp/wlproxy_stgm.log  
  659.     </IfModule>  
  660.     <Directory "/svcrootStg/runtime/webstatic/MobileWAP-Backoffice">  
  661.         AllowOverride None  
  662.         Options FollowSymLinks  
  663.    #    Options Indexes MultiViews  
  664.         Order deny,allow  
  665.         Allow from all  
  666.     </Directory>  
  667.   
  668. </VirtualHost>  
  669.   
  670.   
  671. <VirtualHost *:80>  
  672.     DocumentRoot "/svcrootStg/runtime/webstatic/MobileApp-Backoffice"  
  673.     ServerName stgonapp.test.com.cn  
  674.     #    ServerName www.test.com.cn  
  675.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonapp-error_log.%m%d 86400"  
  676.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonapp-access_log.%m%d 86400" common  
  677.     <IfModule mod_weblogic.c>  
  678.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  679.         WebLogicHost testch-doap  
  680.         WebLogicPort 8311  
  681.         WLCookieName APPJSESSIONID  
  682.         MatchExpression */controller/*  
  683.         MatchExpression *.jsp  
  684.         MatchExpression *.fo  
  685.         MatchExpression */ws/*  
  686.         ConnectTimeoutSecs 4  
  687.         ConnectRetrySecs 2  
  688.         DynamicServerList ON  
  689.         Idempotent OFF  
  690.         WLIOTimeoutSecs 40  
  691.         Debug OFF  
  692. #       WLLogFile /tmp/wlproxy_stgm.log  
  693.     </IfModule>  
  694.     <Directory "/svcrootStg/runtime/webstatic/MobileApp-Backoffice">  
  695.         AllowOverride None  
  696.         Options FollowSymLinks  
  697. #    Options Indexes MultiViews  
  698. Order deny,allow  
  699. Allow from all  
  700. </Directory>  
  701.   
  702. </VirtualHost>  
  703.   
  704.   
  705. <VirtualHost *:80>  
  706. DocumentRoot "/svcrootStg/runtime/webstatic/API-Backoffice"  
  707.     ServerName stgonapi.test.com.cn  
  708.     #    ServerName www.test.com.cn  
  709.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonapi-error_log.%m%d 86400"  
  710.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonapi-access_log.%m%d 86400" common  
  711.     <IfModule mod_weblogic.c>  
  712.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  713.         WebLogicHost testch-doap  
  714.         WebLogicPort 8411  
  715.         WLCookieName APIJSESSIONID  
  716.         MatchExpression */controller/*  
  717.         MatchExpression *.jsp  
  718.         MatchExpression *.fo  
  719.         MatchExpression */ws/*  
  720.         ConnectTimeoutSecs 4  
  721.         ConnectRetrySecs 2  
  722.         DynamicServerList ON  
  723.         Idempotent OFF  
  724.         WLIOTimeoutSecs 40  
  725.         Debug OFF  
  726. #       WLLogFile /tmp/wlproxy_stgwww.log  
  727.     </IfModule>  
  728.     <Directory "/svcrootStg/runtime/webstatic/API-Backoffice">  
  729.         AllowOverride None  
  730.         Options FollowSymLinks  
  731.    #    Options Indexes MultiViews  
  732.         Order deny,allow  
  733.         Allow from all  
  734.     </Directory>  
  735.   
  736. </VirtualHost>  
  737.   
  738.   
  739. <VirtualHost *:80>  
  740.     DocumentRoot "/svcrootStg/runtime/webstatic/CMS-Backoffice"  
  741.     ServerName stgonadm.test.com.cn  
  742.     #    ServerName www.test.com.cn  
  743.     ErrorLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonadm-error_log.%m%d 86400"  
  744.     CustomLog "|/app/apache2/bin/rotatelogs /app/logs/webserver/stgonadm-access_log.%m%d 86400" common  
  745.     <IfModule mod_weblogic.c>  
  746.         #WebLogicCluster 52.208.110.181:8101,52.208.110.181:8102  
  747.         WebLogicHost testch-doap  
  748.         WebLogicPort 8511  
  749.         WLCookieName ADMJSESSIONID  
  750.         MatchExpression */controller/*  
  751.         MatchExpression *.svl  
  752.         MatchExpression *.jsp  
  753.         MatchExpression *.fo  
  754.         MatchExpression */ws/*  
  755.         ConnectTimeoutSecs 4  
  756.         ConnectRetrySecs 2  
  757.         DynamicServerList ON  
  758.         Idempotent OFF  
  759.         WLIOTimeoutSecs 40  
  760.         Debug OFF  
  761. #       WLLogFile /tmp/wlproxy_stgwww.log  
  762.     </IfModule>  
  763.     <Directory "/svcrootStg/runtime/webstatic/CMS-Backoffice">  
  764.         AllowOverride None  
  765.         Options FollowSymLinks  
  766.    #    Options Indexes MultiViews  
  767.         Order deny,allow  
  768.         Allow from all  
  769.     </Directory>  
  770.   
  771. </VirtualHost>  
  772. </span>  

4、weblogic附表

附表-插件的通用参数(大小写区分)

参数

默认值

描述

WebLogicHost

(如果代理到单个WebLogic服务器,那么应该设置该参数)

none

HTTP请求被递交到该WebLogic Server主机(或者是定义在WebLogic Server中运行的类似于Web server的虚拟主机名)如果使用集群,那么应该使用WebLogicCluster参数而不是WebLogicHost参数。

WebLogicPort

(如果代理到单个WebLogic服务器,那么应该设置该参数)

none

WebLogic服务器监听WebLogic连接请求的端口。(如果在插件与WebLogic服务器之间使用SSL,那么应该把该参数设置为SSL监听端口(见8-4页的"配置监听端口")并将SecureProxy参数设置为ON)。

如果使用WebLogic集群,那么应该设置WebLogicCluster参数而不是WebLogicPort参数。

WebLogicCluster

(如果代理到一个WebLogic服务器集群,那么必须设置该参数)

none

集群中的WebLogic服务器列表,用于负载平衡目的。该列表由逗号分隔开的host:port组成。例如:

WebLogicCluster myweblogic.com:7001,

yourweblogic.com:7001,theirweblogic.com:7001

如果插件与WebLogic服务器之间使用SSL协议,那么将端口号设置为SSL监听端口(见8-3页的"配置监听端口")并将SecureProxy参数设置为ON。

应该用该参数取代WebLogicHost与WebLogicPort参数,WebLogic Server首先查找WebLogicCluster参数,如果没有找到该参数,它将寻找并使用WebLogicHost与WebLogicPort参数。

插件对所有可用的集群成员进行轮询。该参数所指定的集群列表是服务器与插件共同维护的动态列表的初始值。WebLogic服务器与插件将根据新加入的、失败的以及恢复的集群成员的情况动态地更新集群列表。

如果将 DynamicServerList参数设置为OFF(只适用于Microsoft Internet Information Server),那么集群列表的动态更新被禁用。插件将请求导向集群中最初创建cookie的那个服务器上(请求包含cookie、URL- encoded会话或存于POST数据中的会话信息)。

PathTrim

none

在请求被转交到WebLogic服务器之前,被插件从原始URL中裁剪掉的字符串。例如:如果原始URL为

http://myWeb.server.com /weblogic/foo被传递到插件进行解析且PathTrim参数被设置为/weblogic,那么传递到WebLogic服务器的URL变 为:http://myweblogic.server.com:7001/foo

PathPrepend

null

加在原始URL前的前缀字符串,该动作发生在PathTrim被裁剪后,请求转向WebLogic服务器之前。

ConnectTimeoutSecs

10

插件进行WebLogic服务器主机连接尝试的时间上限。该值应该大于 ConnectRetrySecs参数。如果超过ConnectTimeoutSecs还没能连接成功,即使进行了适当次数的连接重试(见 ConnectRetrySecs参数),也将把HTTP 503/Service Unavailable响应返回给客户端。

可以使用ErrorPage参数定制错误响应。

ConnectRetrySecs

2

该参数以秒为单位,设置了两次WebLogic Server主机(或集群中的所有服务器)连接尝试之间,插件的休眠时间。该参数的值应该小于ConnectTimeoutSecs。插件在返回HTTP 503/Service Unavailable响应之前,它将进行的连接次数为ConnectTimeoutSecs除以ConnectRetrySecs所得的值。

如果不希望重试连接,那么应该将ConnectRetrySecs值应该与ConnectTimeoutSecs相等。不过,插件会至少进行两次连接尝试。

可以用ErrorPage参数定制错误响应。

Debug

OFF

设置调试操作时的日志类型。在生产系统中不建议你开启这些调试选项。

在UNIX系统中,调试信息被写到 /tmp/wlproxy.log文件中;在Windows NT系统,调试信息被写到c:/temp/wlproxy.log文件中,通过WLLogFile参数,你可以使用其他路径下的其他文件覆盖文件名、路径 参数。你可以设置以下日志选项(其中HFC, HTW, HFW, HTC可以联合使用,它们之间用逗号隔开,如"HFC, HTW");

ON

  插件只记录报告性消息与错误消息

OFF

  不记录调试信息

HFC

  记录来自客户端消息、报告性消息以及错误消息的消息头。

HTW

  记录从weblogic发送来的消息头,报告性消息与错误消息

HFW

  记录来自weblogic服务器消息的消息头,报告性消息与错误消息

HTC

  记录发送到客户端消息的消息头,报告性消息与错误消息

ALL

  记录发送到客户端以及客户端发送的消息的头,发送到WebLogic服务器以及WebLogic服务器发送的消息头,报告性消息,错误消息

WLLogFile

参见Debug参数

指明当Debug参数为ON时,产生日志文件的路径和文件名,在设置该参数前,必须创建相应目录。

DebugConfigInfo

OFF

启用特殊查询参数"_WebLogicBridgeConfig"。该参数可以被用来了解插件的配置参数的细节。

例如,如果把 DebugConfigInfo设置为ON,那么"_WebLogicBridgeConfig"被启用。发送一个包含查询字符 串?_WebLogicBridgeConfig的请求,插件将收集配置信息有运行时的统计信息并将这些信息返回给浏览器。在处理该请求时,插件没有连接 到WebLogic服务器。

该参数只应严格用于调试目的。消息的输出格式随版本的变化而不同。为了安全起见,在生产环境中应该将该参数设置为OFF。

StatPath(Microsoft Internet Information Server 插件没有这个参数。)

false

如果把该参数设置为真,插件在把请求传递到WebLogic服务器之前检查被转换的路径是 否存在或及其访问权限("Proxy-Path-Translated")。如果文件不存在,将把HTTP 404 File Not Found响应返回给客户端。如果文件存在,但它的权限不是world-readable,那么将返回HTTP 403/Forbidden响应。这两种情况下Web服务器处理这些响应的缺省机制是执行响应的体内容。如果WebLogic服务器的Web应用与Web 服务器具有相同的文档根,那么该选项非常有用。

可以使用ErrorPage参数定制错误响应。

ErrorPage

none

可以制作自己的错误响应页面,在Web服务器不能将请求代理到WebLogic服务器时使用。

设置该参数的方式有两种:

  • 作为相对URI(文件名)。插件自动将返回错误的Web应用的上下文路径加到URI中。对错误页面的请求是否回代理到WebLogic服务器取决于你对代理的配置(是MIME类型式代理还是路径式代理)。
  • 作为绝对URI(建议)。使用错误页面的绝对路径能够使请求总是被代理到WebLogic服务器中的正确资源上。例如: http://host:port/myWebApp/ErrorPage.html

HungServerRecoverSecs

300

定义了插件等待WebLogic服务器响应请求的时间。在等待了 HungServerRecoverSecs时间后,插件还没有得到服务器的响应,那么它将宣布该服务器已经死机并失败转移到下一个服务器。应该把该参数 设置为一个较大的值。如果所设置的值小于servlets进行处理的时间,那么会得到意想不到的后果。

最小值为:10

最大值为:600

Idempotent

ON

如果该参数设置为ON,那么当服务器在指定的HungServerRecoverSecs 时间没有响应,那么插件将进行容错处理。如果设置为OFF,插件将不进行失败转移。如果所使用的是Netscape Enterprise Server插件或Apache HTTP Server插件,不同的URL与MIME类型可以有不同的Idempotent参数设置。

CookieName

JSESSIO

NID

如果改变了WebLogic服务器Web应用中的WebLogic服务器会话cookie 的名字,那么相应地应该将插件的CookieName参数设置为相同的值。WebLogic会话cookie的名字在特定于WebLogic的分发描述符 的<session-descriptor>元素中定义

DefaultFileName

none

如果URI为"/",插件将执行以下步骤:

1.裁剪掉PathTrim参数所指定的路径

2.在后面加上DefaultFileName所指定的文件名

3.在前面加上 PathPrepend参数所指定的值这样处理可以防止WebLogic服务器的重定向。将DefaultFileName设置为代理WebLogic服 务器的Web应用的缺省欢迎页面。例如,如果DefaultFileName被设置为welcome.html,那么下面这个HTTP请求:

http://somehost/weblogic

变为:http://somehost/weblogic/welcome.html。只有当所有被重定向的web应用指定相同的欢迎页面, 该参数才起作用。可以参见以下页面的"Configuring Welcome Pages"部分:

http://e-docs.bea.com/wls/docs61/webapp/components

对于Apache用户,所使用的是Stronghold或Raven的版本,在Location块中定义参数,而非IfModule块中

MaxPostSize

-1

POST数据的允许的最大长度。如果内容的长度超过MaxPostSize,插件将返回一个错误消息。如果设置为-1,将不检查POST数据的长度。设置该参数可以防止通过发送大量数据使服务器过载的"拒绝服务攻击"。

MatchExpression

(该参数只适用于Apache HTTP服务器)

none

如果采用MIME类型方式代理,应该在一个IfModule块中使用MatchExpression参数设置文件名模式。

下面的一个例子说明了使用MIME类型方式的代理:

<IfModule mod_weblogic.c>

MatchExpression *.jsp

WebLogicHost=myHost|paramName=value

</IfModule>

下面的一个例子说明了使用路径方式的代理:

<IfModule mod_weblogic.c>

MatchExpression /weblogicWebLogicHost=myHost|paramName=value

</IfModule>

FileCaching

ON

当该参数设置为ON,如果请求中的POST数据大于2084个字节,那么POST数据保存 在硬盘的一个临时文件中,然后以8192字节为单位传给WebLogic服务器。但将FileCaching设置为ON,可能引起的问题是浏览器上将显示 一个进展条表明正在进行下载。即使文件还在传输,浏览器也会显示下在已经完成。

如果该参数设置为OFF,那么当 POST数据大于2084字节时,数据保存在内存中并以8192字节为单位发送到WebLogic服务器。将参数设置为OFF可能会引起问题。因为插件不 能进行失败转移,因此如果请求被处理时WebLogic 服务器宕机了,那么数据将被丢失。

WlForwardPath

(只有Microsoft IIS才需要定义该单数)

null

如果WLForwardPath设置为"/",那么所有请求都被代理到WebLogic服 务器。如果只想代理以特定字符串开头的请求,那么应该将WlForwardPath参数设置为这个字符串。例如,将WlForwardPath设置为 /webogic,那么所有以/weblogic开始的请求都将被代理到WebLogic服务器。

如果采用路径方式的代理,那么必须设置该参数。可以为该参数设置多个字符串,字符串之间用逗号隔开,例如:WlForwardPath=/weblogic,/bea。

KeepAliveSecs

(不要为Apache HTTP服务器版本1.3.x定义该参数)

30

该参数定义了隔多长时间后,插件与WebLogic服务器之间的非活动连接将被关闭。要使该参数生效,KeepAliveEnabled参数应该设置为true。

该参数的值应该小于或等于在管理控制台的Server/HTTP标签页中Duration字段的值,或者是服务器Mbean中的keepAliveSecs属性的值。

KeepAliveEnabled

True

启用插件与WebLogic服务器之间的连接池。

QueryFromRequest

(只适用于Apache HTTP服务器)

OFF

如果该参数设置为ON,那么Apache插件使用(request_rec *)r->the request将查询字符串传递到WebLogic服务器。(详细信息,请参见Apache文档。)这种行为在以下场合非常有用:

当Netscape 版本4.x浏览器发出的请求的查询字符串中包含空格。

如果你在HP上使用Raven Apache 1.5.2

如果该参数设置为OFF,那么Apache插件使用(request_rec *)r->args将查询字符串传递到WebLogic服务器。

MaxSkips

(在Apache 1.3 中不可用)

10

只有当DynamicServerList设置为OFF时,该参数的设置才生效。如果 WebLogicCluster参数所设置的列表或由WebLogic服务器返回的动态集群列表中的WebLogic服务器失败了,那么该失败的服务器被 标记为"坏的",同时插件将连接到列表中的下一个服务器中。

MaxSkip设置了插件重试"坏"服务器的次数。每当插件接收到一个唯一请求(即不包含cookie的请求)时,它会连接到列表中的一个新服务器上

DynamicServerList

(只能在Microsfot IIS中设置该参数)

ON

如果该参数设置为OFF,在对由插件所代理的请求进行负载平衡时,不使用动态集群列表,而是使用WebLogicCluster参数指定的静态列表。通常情况下,该参数应该设置为ON。将该参数设置为ON,可能会产生以下影响:

  • 如果静态列表中的一或多个服务器失败了,那么插件可能会因为重试连接到失效服务器而导致性能的降低。
  • 当你在集群中新增了一个服务器,如果不重新定义这个参数,插件就不能将请求代理到这个新服务器上。WebLogic服务器会自动地将新服务器加到动态服务器列表,从而使新服务器成为集群的一部分。




----------------------------------

(完)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值