Configuring Oracle HTTP Server 12c for WebLogic Server Domain
Posted
by Emin Askerov
on Oracle Blogs
See other posts from Oracle Blogs
or by Emin Askerov
Published on Tue, 3 Jun 2014 07:55:36 +0000
Indexed on
2014/06/03
9:31 UTC
Read the original article
Hit count: 380
/Oracle Fusion Middleware
1. Introduction to Oracle HTTP Server: http://docs.oracle.com/middleware/1212/webtier/index.html
2. Weblogic Management Framework: http://docs.oracle.com/middleware/1212/core/ASCON/terminology.htm#ASCON11260
In the given post I would like to cover rather simple use
case how to configure OHS as web proxy in Weblogic Cluster environment. For example, we have
existing Weblogic Domain where some managed servers have been joined to cluster
and host business applications. We need to configure web proxy component which
will act as entry point, load balancer for our cluster for user requests. Of
course, we could install old good Apache HTTP Server and configure mod_wl plugin. However this solution not
optimal from manageability perspective: we need to install Apache, install
additional plugin then configure it by editing configuration file which is not really
convenient for FMW Administrators and often increase time of performing of
simple administrative task. Alternatively, we could use OHS as System Component
within Weblogic Domain and use full power of Weblogic Management Framework in
order to configure, manage and monitor it! I like this idea! What about you? I hope
after reading this post you will agree with me.
First of all it is necessary to download OHS binaries. You can use this link for downloading: http://www.oracle.com/technetwork/java/webtier/downloads/index2-303202.html
As we will use Fusion Middleware Control for managing OHS instances it is necessary to extend your domain with Enterprise Manager and Oracle ADF and JRF templates. This is not topic for focusing in this post, but you could get more information from documentation or one of my previous posts:
- http://docs.oracle.com/middleware/1212/wls/WLDTR/fmw_templates.htm#sthref64
- https://blogs.oracle.com/imc/entry/the_specifics_of_adf_12c
Note: you should have properly configured Node Manager utility for managing OHS instances
Let’s consider configuration process step by step:
1. Shut down all Weblogic instances of existing domain including Admin Server;
2. Install Oracle HTTP Server. You should use your Fusion Middleware Home Path (e.g. /u01/Oracle/FMW12) for Installation Location and select Colocated HTTP Server option as Installation Type. I will not focus on this topic in this post. All information related to OHS installation you could find here: http://docs.oracle.com/middleware/1212/webtier/WTINS/install_gui.htm#i1082009
3. Next we need to extend our existing domain with OHS component. In order to do this you should do the following:
a. Run Fusion Middleware Configuration Wizard (ORACLE_HOME/oracle_common/common/bin/config.sh);
b. On the step 1 select Update an existing domain option and point your Fusion Middleware Home Path;
c. On the step 2 check Oracle HTTP Server, Oracle Enterprise Manager Plugin for WEBTIER templates;
d. Go through other steps without any changes and finish configuration process.
4. Start Admin Server and all managed servers related to your cluster
5. Log in to Enterprise Manager FMW Control using http://<hostname>:<port>/em URL
6. Now we will create OHS instance within our Weblogic Domain Infrastructure. Navigate to Weblogic Domain -> Administration -> Create/Delete OHS menu item;
7. Enter to edit mode, clicking Changes -> Lock&Edit menu item;
8. Create new OHS instance clicking Create button;
9. Define Instance Name (e.g. DevOSH) and Machine parameters;
10. Now we need to define listen port. By default OHS will use 7777 port number for income HTTP requests. We could change it to any free port number we would like to use. In order to do it, right click on our created OHS instance (left hand panel) and navigate to Administration -> Port Configuration;
11. Click on record with port number 7777 and then click Edit button;
12. Change port number value (in our case this will be 8080) and then click OK button;
13. Now we need to edit mod_wl_ohs configuration in order to enable OHS to act as proxy for WebLogic Server Instances/Cluster;
14. In order to do it right click on our created OHS instance (left panel) and navigate to Administration -> mod_wl_ohs Configuration;
a. In Weblogic Cluster you should enter cluster address (define <host:port> for all managed servers which participated in cluster), e.g: 192.168.56.2:7004,192.168.56.2:7005
b. Define Weblogic Port parameter at which the Oracle WebLogic Server host is listening for connection requests from the module (or from other servers);
c. Check Dynamic Server List option. This will dynamically update cluster list for every request;
d. In the Location table define list of endpoint locations which you would like to process. In order to do this click Add Row button and define Location, Weblogic Cluster, Path Trim and Path Prefix parameters (if required);
e. Click Apply button in order to save changes.
15. Activate changes clicking Changes ? Activate Changes menu item;
16. Finally we will start configured OHS instance. Right click on OHS instance tree item under Web Tier folder, select Control -> Start Up menu item;
17. Ensure that OHS instance up and running and then test your environment. Run deployed application to your Weblogic Cluster accessing via OHS web proxy;
© Oracle Blogs or respective owner