Oracle Web Cache and Oracle HTTP Server are both part of Oracle Fusion Middleware 11g Web Tier.
This tutorial covers exercising the Oracle Web Tier Oracle Web Cache as it proxies the Oracle HTTP Server (OHS). No configuration changes should be needed as the default names and addresses are already the proper values for a single host environment.
Approximately 1/2 hour.
When a user accesses a Web page, the content can be served by a combination of three sources:
You have a one-host server with Oracle Fusion Middleware 11g Web Tier installed: Oracle Web Cache and Oracle HTTP Server (OHS). You have Web pages deployed on the OHS, and you want those pages dynamically cached for speed and efficiency, thus reducing network traffic and improving user response time in loading Web pages.
This OBE requires a working Oracle Fusion Middleware 11g Web Tier installation with Enterprise Manager 11g Fusion Middleware Control. In order to do that, the following list of software steps is required:
Before starting this tutorial, you should:
. |
Complete OBE "Installing and Configuring Web Tier with WebLogic Server Domain" or equivalent |
|---|---|
. |
Have write access to the host disk |
The configurations should all be correct by default, all you need to do is to run some Web pages through the proper ports. To test the Web pages, perform the following steps:
. |
In a Web browser, go to URL http://yourhostname.com:7001/em where the Oracle Enterprise Manager 11g Fusion Middleware Control is running, and log in with the default User Name of weblogic.
Expand all of the plus
The Up arrows ( Note that this exercise does not require you to access the WebLogic Server (other than it is used to run the Enterprise Manager 11g FMW Control configuration menus).
|
|
|---|---|---|
. |
On the left panel, navigate to Farm_base_domain > Web Tier > ohs1. Observe that the Oracle HTTP Server is running, but nothing has been processed.
Ignore the CPU spikes in blue if the management tools are on the same CPU as the OHS server.
|
|
. |
On the left panel, navigate to Farm_base_domain > Web Tier > webcache1. Observe that the Web Cache is running, but nothing has been cached nor served.
Ignore the CPU spikes in blue if the management tools are on the same CPU as the Web Cache server.
|
|
. |
Create a simple sample static Web page and place it in the default directory for Web pages.
Open a text editor in a terminal session. Use gedit or vi or your editor of choice. The file can contain anything. To be interesting, include an image from the /images directory. A sample might look like this:
Save the file in /u01/app/oracle/product/fmw/11.1.1.1/as_4/instances/instance1/config/OHS/ohs1/htdocs, the default directory for OHS Web pages. Name it something like myjunk.html.
|
|
. |
In a Web browser, test the Web page against OHS directly without going through Web Cache.
Port 7777 is the default for OHS. The default directory path /u01/app/oracle/product/fmw/11.1.1.1/as_4/instances/instance1/config/OHS/ohs1/htdocs is assumed.
|
|
. |
Now try the same page by going through the Web Cache. Click Refresh
Port 7785 is the default listen port for the Web Cache. It is mapped from 7785 to the default OHS port of 7777. You can change both ports later if you need to. There are another set of default ports that do the same thing for SSL.
|
|
. |
Observe that the caching statistics show up now. Navigate back to Web Cache > Home.
Obviously this is not a big savings, but it illustrates the concept.
|
|
. |
Show the particular items that were just cached.
Navigate to Web Cache > Monitoring > Popular Requests.
There are many default rules about what is cached and what is not, what is compressed and what is not, and the expiration time for those items. Since .png files are compressed already, there is no point in trying to further compress them. Text (html), on the other other hand, compresses well.
|
You have just exercised the Oracle Web Cache and the Oracle HTTP Server, both part of the Oracle Fusion Middleware 11g Web Tier. By default, the ports 7785 and 7777 are connected to each other so that requests for Web pages on port 7785 get routed through the Web Cache on to the Oracle HTTP Server on 7777. If you wanted to, you can temporarily defeat the caching by accessing the Web pages on the Oracle HTTP Server directly on port 7777. In many cases involving a single host, the default configuration settings are adequate for an initial demonstration.
In this tutorial, you have learned how to:
Credits (Optional)
![]()