Installing and Configuring the Apache HTTP Server Plug-In 3-7
Location
■
All the requests which match jurl will have Debug Level set to ALL and log messages will be logged to c:tmpglobal_proxy.log file. All the requests
which match web will have Debug Level set to OFF and no log messages will be logged. All the requests which match foo will have Debug Level set to ERR
and log messages will be logged to c:tmpfoo_proxy.log file.
■
Oracle recommends that you use the MatchExpression statement instead of the Files block.
3.2.2.2 Sample weblogic.conf Configuration Files
The following examples of weblogic.conf files may be used as templates that you can modify to suit your environment and server. Lines beginning with are
comments.
Example 3–1 Example Using WebLogic Clusters
These parameters are common for all URLs which are directed to the current module. If you want to override
these parameters for each URL, you can set them again in the Location or Files blocks. Except WebLogicHost,
WebLogicPort, WebLogicCluster, and CookieName.
IfModule mod_weblogic.c WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001
ErrorPage http:myerrorpage.mydomain.com MatchExpression .jsp
IfModule
In Example 3–2
, the MatchExpression parameter syntax for expressing the filename pattern, the WebLogic Server host to which HTTP requests should be forwarded, and
various other parameters is as follows: MatchExpression [filename pattern] [WebLogicHost=host] | [paramName=value]
The first MatchExpression parameter below specifies the filename pattern .jsp, and then names the single WebLogicHost. The paramName=value combinations
following the pipe symbol specify the port at which WebLogic Server is listening for connection requests, and also activate the Debug option. The second
MatchExpression specifies the filename pattern .http and identifies the WebLogicCluster hosts and their ports. The paramName=value combination
following the pipe symbol specifies the error page for the cluster.
Example 3–2 Example Using Multiple WebLogic Clusters
These parameters are common for all URLs which are directed to the current module. If you want to override
these parameters for each URL, you can set them again in the Location or Files blocks Except WebLogicHost,
WebLogicPort, WebLogicCluster, and CookieName.
IfModule mod_weblogic.c MatchExpression .jsp WebLogicHost=myHost|WebLogicPort=7001|Debug=ON
MatchExpression .html WebLogicCluster=myHost1:7282,myHost2:7283|ErrorPage= http:www.xyz.comerror.html
IfModule
3-8 Using Web Server 1.1 Plug-Ins with Oracle WebLogic Server
Example 3–3 shows an example without WebLogic clusters.
Example 3–3 Example Without WebLogic Clusters
These parameters are common for all URLs which are directed to the current module. If you want to override
these parameters for each URL, you can set them again in the Location or Files blocks Except WebLogicHost,
WebLogicPort, WebLogicCluster, and CookieName. IfModule mod_weblogic.c
WebLogicHost myweblogic.server.com WebLogicPort 7001
MatchExpression .jsp IfModule
Example 3–4 shows an example of configuring multiple name-based virtual hosts.
Example 3–4 Example Configuring Multiple Name-Based Virtual Hosts
VirtualHost1 = localhost:80 VirtualHost 127.0.0.1:80
DocumentRoot C:testVirtualHost1 ServerName localhost:80
IfModule mod_weblogic.c ... WLS parameter ...
WebLogicCluster localhost:7101,localhost:7201 Example: MatchExpression .jsp some additional parameter
MatchExpression .jsp PathPrepend=test2 IfModule
VirtualHost VirtualHost2 = 127.0.0.2:80
VirtualHost 127.0.0.2:80 DocumentRoot C:testVirtualHost1
ServerName 127.0.0.2:80 IfModule mod_weblogic.c
... WLS parameter ... WebLogicCluster localhost:7101,localhost:7201
Example: MatchExpression .jsp some additional parameter MatchExpression .jsp PathPrepend=test2
... WLS parameter ... IfModule
VirtualHost
You must define a unique value for ServerName or some Plug-In parameters will not work as expected.
3.2.2.3 Template for the Apache HTTP Server httpd.conf File