You are on page 1of 6

OracleWebCacheFrontEndingOracleHTTPServer11g

OracleWebCacheandOracleHTTPServerarebothpartofOracleFusionMiddleware11gWebTier.
Thistutorialcontainsthefollowingsections:
Purpose
TimetoComplete
Overview
Scenario
SoftwareandHardwareRequirements
Prerequisites
ExercisingOracleHTTPServerandWebCacheOutOfTheBox
Summary
Resources

Purpose
ThistutorialcoversexercisingtheOracleWebTierOracleWebCacheasitproxiestheOracleHTTPServer(OHS).Noconfigurationchanges
shouldbeneededasthedefaultnamesandaddressesarealreadythepropervaluesforasinglehostenvironment.

TimetoComplete
Approximately1/2hour.

Overview
WhenauseraccessesaWebpage,thecontentcanbeservedbyacombinationofthreesources:
Aproxy(forwardand/orreverse)forfrequentlyaccessedcontentsuchasheader/footerinformation,homepages,logos,andnavigation
icons
AWebserverforstaticcontentsuchashtmltagsfortitles,headings,tables,lists,andphotos/images
AnapplicationserversuchasOracleWebLogicServerfordynamiccontentsuchasJavaServerPages(.jsp),possiblylinkedtoabackend
databasesuchasOracle11gDatabase
ThisOBEfocusesonthereverseproxy,orWebcachefunctionasitfrontendsaWebserver.Tosimplifytheenvironment,theWebpageswill
besimplestatichtml,eliminatingthecomplexityofanapplicationserverbeinginthemix.Ifyouhadmorecomplexpages,thatdoesnotchange
theWebCacheconfiguration,butmightchangetheOracleHTTPServer(OHS)configuration(modules).Theenvironmentassumesasingle
host:ifyouseparateOracleWebCachefromOracleHTTPServer,thenconfigurationchangeswillneedtobemadeforthenamesand
addressesoftheservers.

Scenario
YouhaveaonehostserverwithOracleFusionMiddleware11gWebTierinstalled:OracleWebCacheandOracleHTTPServer(OHS).You
haveWebpagesdeployedontheOHS,andyouwantthosepagesdynamicallycachedforspeedandefficiency,thusreducingnetworktraffic
andimprovinguserresponsetimeinloadingWebpages.

SoftwareandHardwareRequirements
ThisOBErequiresaworkingOracleFusionMiddleware11gWebTierinstallationwithEnterpriseManager11gFusionMiddlewareControl.In
ordertodothat,thefollowinglistofsoftwarestepsisrequired:
1. InstallWebLogicServer11gbinaries,butdonotrunQuickstart,donotcreateadomainyet.
2. InstallSOAintheWebLogicmiddlewarehomeinordertogettheJavaRequiredFiles(JRF).Note:Youdon'tactuallyuseSOAinthis
OBE.
3. Run<middleware_home>/<soa_directory>/common/bin/config.shtocreateaWebLogicdomain.SelectEnterpriseManager(EM,
whichwillautoselectJRFaswell).Acceptthedefaultsformosteverything.DefaultnameswillbeassumedthroughouttheOBE.
4. StarttheWebLogicserver.YoushouldnowbeabletologintoEMifyouwanttoverifythatEMisworkingproperly.
5. RuntheWebTierinstall.Select"CreateaWebTierinstance"and"AssociateitwithyourWLS."
6. LogintoEM.YoushouldseeOHS(OracleHTTPServer)andWebCacheastargetsontheFarmhomepageinEM.
Thehardwareminimumprerequisitesare:
Onecomputerwithatleasta2GHzprocessor
2GBofRAM(4GBismuchbetter)
20GBoffreedisk(40GBisbetter)
Amonitorwithatleast1024x768pixels

Prerequisites
Beforestartingthistutorial,youshould:
1. CompleteOBE"InstallingandConfiguringWebTierwithWebLogicServerDomain"orequivalent
2. Havewriteaccesstothehostdisk

ExercisingOracleHTTPServerandWebCacheOutOfTheBox

Theconfigurationsshouldallbecorrectbydefault,allyouneedtodoistorunsomeWebpagesthroughtheproperports.TotesttheWeb
pages,performthefollowingsteps:
1. InaWebbrowser,gotoURLhttp://yourhostname.com:7001/emwheretheOracleEnterpriseManager11gFusionMiddlewareControlis
running,andloginwiththedefaultUserNameofweblogic.

Expandalloftheplus iconsandverifythatallsubsystemsareupandrunning.

^
TheUparrows(
)shouldbegreenandalloftheslicesofthepiechartsshouldbegreen.YourHostnamesandaddressesmaybedifferent.
Whereveryouseeedrsr28p1.us.oracle.com,substituteyourhostname.comasappropriate.
NotethatthisexercisedoesnotrequireyoutoaccesstheWebLogicServer(otherthanitisusedtoruntheEnterpriseManager11gFMW
Controlconfigurationmenus).

2. Ontheleftpanel,navigatetoFarm_base_domain>WebTier>ohs1.ObservethattheOracleHTTPServerisrunning,butnothinghasbeen
processed.

IgnoretheCPUspikesinblueifthemanagementtoolsareonthesameCPUastheOHSserver.

3. Ontheleftpanel,navigatetoFarm_base_domain>WebTier>webcache1.ObservethattheWebCacheisrunning,butnothinghasbeen
cachednorserved.

IgnoretheCPUspikesinblueifthemanagementtoolsareonthesameCPUastheWebCacheserver.

4. CreateasimplesamplestaticWebpageandplaceitinthedefaultdirectoryforWebpages.

Openatexteditorinaterminalsession.Usegeditorvioryoureditorofchoice.Thefilecancontainanything.Tobeinteresting,includean
imagefromthe/imagesdirectory.Asamplemightlooklikethis:
<html>
<title>MyJunkWebFile</title>
<body>
<h1>CoolJunkHeading</h1>
<p>Bodyofthedoc.</p>
<p>Animagegoeshere:<imgalt="oracle"src=images/oracle_logo.png>.</p>
</body>
</html>
Savethefilein/u01/app/oracle/product/fmw/11.1.1.1/as_4/instances/instance1/config/OHS/ohs1/htdocs,thedefaultdirectoryfor
OHSWebpages.Nameitsomethinglikemyjunk.html.

5. InaWebbrowser,testtheWebpageagainstOHSdirectlywithoutgoingthroughWebCache.

Port7777isthedefaultforOHS.Thedefaultdirectorypath
/u01/app/oracle/product/fmw/11.1.1.1/as_4/instances/instance1/config/OHS/ohs1/htdocsisassumed.

6. NowtrythesamepagebygoingthroughtheWebCache.ClickRefresh

severaltimestocausetheobjectstobecached.

Port7785isthedefaultlistenportfortheWebCache.Itismappedfrom7785tothedefaultOHSportof7777.Youcanchangebothportslaterif
youneedto.ThereareanothersetofdefaultportsthatdothesamethingforSSL.

7. Observethatthecachingstatisticsshowupnow.NavigatebacktoWebCache>Home.

Obviouslythisisnotabigsavings,butitillustratestheconcept.

8. Showtheparticularitemsthatwerejustcached.

NavigatetoWebCache>Monitoring>PopularRequests.

Therearemanydefaultrulesaboutwhatiscachedandwhatisnot,whatiscompressedandwhatisnot,andtheexpirationtimeforthoseitems.
Since.pngfilesarecompressedalready,thereisnopointintryingtofurthercompressthem.Text(html),ontheotherotherhand,compresses
well.

Summary
YouhavejustexercisedtheOracleWebCacheandtheOracleHTTPServer,bothpartoftheOracleFusionMiddleware11gWebTier.By
default,theports7785and7777areconnectedtoeachothersothatrequestsforWebpagesonport7785getroutedthroughtheWebCache
ontotheOracleHTTPServeron7777.Ifyouwantedto,youcantemporarilydefeatthecachingbyaccessingtheWebpagesontheOracle
HTTPServerdirectlyonport7777.Inmanycasesinvolvingasinglehost,thedefaultconfigurationsettingsareadequateforaninitial
demonstration.
Inthistutorial,youhavelearnedhowto:
AccesstheWebCacheonthedefaultportsusingthedefaultservermappings
AccesstheOracleHTTPServeronthedefaultportsusingthedefaultconfigurations
AccessaWebpagethroughthecachingandexaminethestatisticsonthecachingperformed

Resources
OracleFusionMiddlewareGuideAdministrator'sGuideforOracleWebCache11gRelease1(11.1.1)
ConfiguringandManagingOracleWebCacheeStudy
TolearnmoreaboutFusionMiddleware,refertoadditionalOBEsontheOTNWebsite
Credits(Optional)
LeadCurriculumDeveloper:SteveFriedberg
OtherContributors:RamaaMani

UserComments
Title:
Postasb.aissaoui@oracle.com

Postanonymously

Bysubmittingacomment,youconfirmthatyouhavereadandagreedtothetermsandconditions.
Thisfeedbackformisfortutorialcorrectionsandsuggestions.Becauseofthevolumeofsuggestions,wecannotreplytoeverycomment.In
particular:
IfyouhavegeneralquestionsaboutthisOraclesoftwareproduct,consulttheOTNforumsinstead.
Ifyouareencounteringasoftwareproblemandneedtorequestsupportorconsulting,fileaservicerequestonMyOracleSupport.
Ifyouwanttoorderhardcopydocumentation,gototheOracleStore.

Submitanewcomment

(Commentsaremoderatedandwillnotappearimmediately.)