Configure the Host and Port fields using the descriptions in

2-28 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache 2. For undefined sites for requests that do not match any site, use Oracle Web Cache Manager and perform the following tasks:

a. From Oracle Web Cache Manager, in the navigator frame, select Origin

Servers, Sites, and Load Balancing Site Definitions. See Section 2.7.2 . The Site Definitions page displays.

b. Select the Undefined Sites row, and then click ShowEdit Selected.

The ShowEdit Undefined Sites Definition dialog displays.

c. For the Site-Wide Compression element, click No.

d. Click Submit.

e. Click Apply Changes.

f. Restart Oracle Web Cache. See Section 2.13 .

2.11.4 Task 4: Map Site Definitions to Origin Servers

After you specify site definitions, you create ordered mappings of sites to origin servers. For an overview of site configuration, see Section 2.2 . If Oracle HTTP Server was installed, the installation process creates a default site-to-server mapping based on the host name and listening port of Oracle HTTP Server. If you configured multiple origin servers in Section 2.11.2 for load balancing , then create one site-to-server mapping that maps all the applicable origin servers to the site. In that site-to-server mapping, select all the origin servers that apply for the site. If you split the origin servers among multiple site-to-server mappings, load balancing for the site does not occur in the intended manner. To map sites to origin servers: 1. Navigate to the Web Cache Home page in Fusion Middleware Control. See Section 2.6.2 .

2. From the Web Cache menu, select Administration and then Sites.

The Sites page displays.

3. From the Site-to-Server Mapping section, click Create.

The Create Site-to-Server Mapping page displays.

4. Configure the Host Pattern, Port Pattern, and Prefix elements:

a. In the Host Pattern field, enter the site pattern, such as www.company.com.

To enable Oracle Web Cache to match requests to this site, do not add protocol information http: or https: to the host name. You can use the wildcard in the Host Pattern field in the following ways: - Map multiple site names to one or more application Web server or proxy servers. For example, .company.com can be used to match sites site1.company.com and site2.company.com. - Route cache misses to sites outside a firewall and accessible by a proxy server. For example, can be used to map to proxy server proxy-host.

b. In the Port Pattern field, enter the HTTP or HTTPS port number for the Web

site from which Oracle Web Cache is listening for incoming requests. Getting Started with Administering Oracle Web Cache 2-29 You can use the wildcard in the Port Pattern field to map the same site name with different port numbers to the same origin servers. If the origin servers are proxy servers, ensure they were configured to listen on the same port as the application Web server being proxied, as described in Section 2.11.2 .

5. In the Origin Servers section, select the origin servers.

If you select multiple origin servers, the servers must be of the same type and use the same protocol on their listening port HTTP or HTTPS. For example, you cannot have a mix of application Web servers and proxy servers.

6. Click OK to apply changes and return to the Sites page. It is not necessary to click

Apply in the Sites page to apply this change. 7. Repeat Steps 3 to 6 for each additional mapping.

8. In the Sites page, use the Move Up and Move Down features to order the

mappings. Oracle Web Cache resolves an incoming request first to a site definition, and then to the first matching site-to-origin server mapping. See Section 2.2 for more information about how Oracle Web Cache uses the order of site definitions and site-to-server mappings to match requests..

2.11.5 Task 5: Set Resource Limits and Network Thresholds

For more information about resource limits, see Section 2.3 . To specify caching and network thresholds for Oracle Web Cache: 1. Specify caching thresholds: 1. Navigate to the Web Cache Home page in Fusion Middleware Control. See Section 2.6.2 .

2. From the Web Cache menu, select Administration and then Resource Limits.

The Resource Limits page displays.

3. In the Maximum Cached Object Size field, specify a maximum size of objects

to be stored in the cache in kilobytes KB. For more information about the value to enter, see Section 2.3.3

4. For each cache, in the Maximum Cache Size field, enter the amount of

memory the Oracle Web Cache requires in megabytes MB. For more information about the value to enter, see Section 2.3.1 .

5. In the Maximum Incoming Connections field, enter the maximum number of

incoming connections to Oracle Web Cache. For more information about the value to enter, see Section 2.3.2 .

6. Click Apply.

2. For all the caches, modify the network timeouts:

a. From Oracle Web Cache Manager, select Properties Network Timeouts. See

Section 2.7.2 .

b. From the For Cache list, select a specific cache.

c. Select a timeout type and click Edit Selected. For more information about the

timeouts, see Section 2.3.4 . 2-30 Oracle Fusion Middleware Administrators Guide for Oracle Web Cache

d. In the Edit dialog for the threshold, modify the value for the Duration field or

select Use Default to use the default value. For the keep-alive timeout, if you set the value to 0, the connection to the client is not kept open. In addition, Oracle Web Cache sends the following response-header field in the response: Connection: Close For more information about the value to enter, see Section 2.3.4 .

e. Select option Use for all caches in the cluster to apply the duration to all

caches; deselect the option to apply the change to current cache only.

f. Click Submit.

g. Click Apply Changes.

You can always revert to the default values. In the Network Timeouts page, click Use Defaults, and then click Apply Changes to apply changes.

2.11.6 Task 6: Configure Error Pages

For situations in which there is a network communication error, site busy error, or ESI esi:include error, applications serve error pages. Rather than burden the origin server with this task, you can configure these pages to be served from Oracle Web Cache. To configure Oracle Web Cache to serve error pages for a site:

1. Create error pages and place them in the following directory locations:

UNIX ORACLE_INSTANCEinstance_nameconfigWebCachewebcache_namefiles Windows ORACLE_INSTANCE\instance_name\config\WebCache\webcache_name\files The default settings are as follows: ■ For network errors, the default setting is set to network_error.html. This error page is served when there is a network problem while connecting, sending, or receiving a response from an origin server for a cache-miss request. ■ For site busy errors, the default setting is set to busy_error.html. This page is served when origin server capacity is reached. ■ For ESI default fragments, the default setting is set to esi_fragment_ error.txt. This page is served when Oracle Web Cache cannot fetch the src specified in an esi:include tag and the alt attribute, onerror attribute, or the try |attempt |except block are either not present or fail. For a production environment, modify the defaults or create entirely new error pages to be consistent with other error pages for the site.

2. From Oracle Web Cache Manager, in the navigator frame, select Origin Servers,