obe_ web cache with ohs

Upload: ad-elou

Post on 06-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 OBE_ Web Cache With OHS

    1/6

    Oracle Web Cache Front-Ending Oracle HTTP Server 11g 

    Oracle Web Cache and Oracle HTTP Server are both part of Oracle Fusion Middleware 11 g  Web Tier.

    This tutorial contains the following sections:

    Purpose

    Time to Complete

    Overview

    ScenarioSoftware and Hardware Requirements

    Prerequisites

    Exercising Oracle HTTP Server and Web Cache Out-Of-The-Box

    Summary

    Resources

    Purpose

    This tutorial covers exercising the Oracle Web Tier Oracle Web Cache as it proxies the Oracle HTTP Server (OHS). No configuration changesshould be needed as the default names and addresses are already the proper values for a single host environment.

    Time to Complete

     Approxi mately 1/2 h our.

    Overview

    When a user accesses a Web page, the content can be served by a combination of three sources:

     A p roxy (forward and/or reverse) for frequ ently accessed content such as heade r/footer in formation, home pages , lo gos, a nd navig ationicons

     A Web server for static content such as html tags for titles, h eadings, tab les, lists, and photos/ima ges An appl ication server such as Orac le WebLog ic Server for dyn amic content such as J ava Server Pages (.jsp), po ssibly l inked to a back-en ddatabase such as Oracle 11g  Database

    This OBE focuses on the reverse proxy, or Web cache function as it front-ends a Web server. To simplify the environment, the Web pages willbe simple static html, eliminating the complexity of an application server being in the mix. If you had more complex pages, that does not changethe Web Cache configuration, but might change the Oracle HTTP Server (OHS) configuration (modules). The environment assumes a singlehost: if you separate Oracle Web Cache from Oracle HTTP Server, then configuration changes will need to be made for the names andaddresses of the servers.

    Scenario

    You have a one-host server with Oracle Fusion Middleware 11g  Web Tier installed: Oracle Web Cache and Oracle HTTP Server (OHS). Youhave Web pages deployed on the OHS, and you want those pages dynamically cached for speed and efficiency, thus reducing network trafficand improving user response time in loading Web pages.

    Software and Hardware Requirements

    This OBE requires a working Oracle Fusion Middleware 11g  Web Tier installation with Enterprise Manager 11g  Fusion Middleware Control. Inorder to do that, the following list of software steps is required:

    1. Install WebLogic Server 11g b inaries, but do not run Quickstart, do not create a domain yet.2. Install SOA in the WebLogic middl eware home in order to get the Java Required Files (JRF). Note: You don't actually use SOA in this

    OBE.3. Run //common/bin/config.sh  to create a WebLogic domain. Select Enterprise Manager (EM,

    which will auto-select JRF as well). Accept the defaults for most everything. Default names will be assumed throughout the OBE.4. Start the WebLogic server. You should now be abl e to log in to EM if you wan t to verify that EM is working properly.5. Run the Web Tier install. Select "Create a Web Tier in stance" and "Associate it with your WLS."6. Log in to EM. You should see OHS (Oracle HTTP Server) and Web Cache as targets on the Farm home page in EM.

    The hardware minimum prerequisites are:One computer with at least a 2 GHz processor 2 GB of RAM (4 GB is much better)20 GB of free disk (40 GB is better)

     A mo nitor with at le ast 10 24x76 8 p ixels

    Prerequisites

    Before starting this tutorial, you should:

    1.   Complete OBE "Installing an d Configuring Web Tier with WebLogic Server Domain" or equivalent

    2.   Have write access to the host disk

    Exercising Oracle HTTP Server and Web Cache Out-Of-The-Box 

    http://-/?-http://-/?-http://-/?-

  • 8/17/2019 OBE_ Web Cache With OHS

    2/6

    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 Webpages, perform the following steps:

    1. In a Web browser, go to URL http:// yourhostname.com:7001/em where the Oracle Enterprise Manager 11g  Fusion Middleware Control isrunning, and log in with the default User Name of weblogic.

    Expand all of the plus icons and verify that all subsystems are up and running.

    The Up arrows (  ^

    ) should be green and all of the slices of the pie charts should be green. Your Host names and addresses may be different.Wherever you see edrsr28p1.us.oracle.com , substitute  yourhostname.com as appropriate.

    Note that this exercise does not require you to access the WebLogic Server (other than it is used to run the Enterprise Manager 11 g  FMWControl configuration menus).

     

    2. On the left panel, navigate to Farm_base_domain > Web Tier > ohs1. Observe that the Oracle HTTP Server is running, but nothing has beenprocessed.

  • 8/17/2019 OBE_ Web Cache With OHS

    3/6

    Ignore the CPU spikes in blue if the management tools are on the same CPU as the OHS server.

     

    3. On the left panel, navigate to Farm_base_domain > Web Tier > webcache1 . Observe that the Web Cache is running, but nothing has beencached nor served.

    Ignore the CPU spikes in blue if the management tools are on the same CPU as the Web Cache server.

     

    4. Create a simple sample static Web page and place it in the default directory for Web pages.

  • 8/17/2019 OBE_ Web Cache With OHS

    4/6

    Open a text editor in a terminal session. Use gedit o r vi or your editor of choice. The file can contain anything. To be interesting, include animage from the /images directory. A sample might look like this:

      My Junk Web File

     

      Cool Junk Heading

     

    Body of the doc.

     

    An image goes here: .

    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.

     

    5. 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.

     

    6. Now try the same page by going through the Web Cache. Click Refresh several times to cause the objects to be cached.

  • 8/17/2019 OBE_ Web Cache With OHS

    5/6

  • 8/17/2019 OBE_ Web Cache With OHS

    6/6

    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, compresseswell.

     

    Summary

    You have just exercised the Oracle Web Cache and the Oracle HTTP Server, both part of the Oracle Fusion Middleware 11 g  Web Tier. Bydefault, the ports 7785 and 7777 are connected to each other so that requests for Web pages on port 7785 get routed through the Web Cacheon 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 initialdemonstration.

    In this tutorial, you have learned how to:

     Access the Web Cache on the d efault ports u sing the d efault server mappi ngs Access the Oracl e HTTP Serve r on the d efault ports u sing the d efault configu rations Access a Web page through the ca ching and examine the statistic s o n the cachin g p erformed

    ResourcesOracle Fusion Middleware Guide Administrator's Guide for Oracle Web Cache 11g Release 1 (11.1.1)Configuring and Managing Oracle Web Cache eStudyTo learn more about Fusion Middleware, refer to additional OBEs on the OTN Web site

    Credits (Optional)

    Lead Curriculum Developer: Steve FriedbergOther C ontributors: Ramaa Mani

    User CommentsTitle: 

    Post as [email protected] Post anonymously

    By submitting a comment, you confirm that you have read and agreed to the terms and conditions.

    This feedback form is for tutorial corrections and suggestions. Because of the volume of suggestions, we cannot reply to every comment. Inparticular:

    If you have general questions about this Oracle software product, consult the OTN forums instead.If you are encountering a software problem and need to request support or consulting, file a service request on My Oracle Support.If you want to order hardcopy documentation, go to the Oracle Store.

    Submit a new comment   (Comments are moderated and will not appear immediately.)

    http://shop.oracle.com/http://myoraclesupport.oracle.com/http://forums.oracle.com/http://www.oracle.com/pls/db111/comment_disclaimerhttp://otn.oracle.com/obehttp://ilearning.oracle.com/ilearn/en/learner/jsp/rco_details_find.jsp?srchfor=1&rcoid=741280072http://download.oracle.com/docs/cd/E15523_01/web.1111/e10143/toc.htm