Apache- Weblogic integration
Recently I had a chance integrate Apache and WebLogic by following below steps you too can do it :)
For this I am using weblogic 10.3.4(Doesn't really matter which WLS version you ar using) and Apache 2.0.
WebLogic server setting
1) Make sure you are 1 Admin and 1 or more managed server.
2) Deploy a sample application in Managed Server which we will be connecting via Apache WebServer.
3) Make sure you have a valid entry in "Listen Address:" for the managed server.(You can validate the same from Admin Console--> Server-->Managed Server-->Configuration-->General)
Configure a Admin and a Managed Server and make sure its running
Make sure you have a valid entry in "Listen Address" tab of Managed Server like below.
Now you will be able to access the application via Apache
Recently I had a chance integrate Apache and WebLogic by following below steps you too can do it :)
For this I am using weblogic 10.3.4(Doesn't really matter which WLS version you ar using) and Apache 2.0.
WebLogic server setting
1) Make sure you are 1 Admin and 1 or more managed server.
2) Deploy a sample application in Managed Server which we will be connecting via Apache WebServer.
3) Make sure you have a valid entry in "Listen Address:" for the managed server.(You can validate the same from Admin Console--> Server-->Managed Server-->Configuration-->General)
Configure a Admin and a Managed Server and make sure its running
Make sure you have a valid entry in "Listen Address" tab of Managed Server like below.
Now deploy a sample application and try to hit the same.
I have uploaded a sample application which will give you the server and host IP address
You will get below page
Sinne you have already installed apache we are going to configure the Apache so that when you hit a request to Apache it should redirect the same to respective WebLogic server
For that we need to go to below location.
C:\Apache2\conf
Where Apache2 is where w have installed the apache.
There we should see a file called httpd.
Take a backup of the existing one and open the file.
If you go to bottom you should see a entry for "Location" and IfModule, which we need to edit it as below
<Location />
SetHandler weblogic-handler
</Location>
<IfModule mod_weblogic.c>
WebLogicCluster <CLuster IP address>
Debug ON
WLLogFile C:\Apache\logs\wlproxy.log
WLTempDir C:\Apache\logs
</IfModule>
Now if you having one IP address then inside IFModule you should enter like below
WebLogicHost myweblogic.server.com
WebLogicPort 7001
If you have multple server in a cluster then the entry should be like
WebLogicCluster myweblogic1.server.com:7001,myweblogic2.server.com:7003,myweblogic3.server.com:7003
Keep the Debug ON and route the wlproxy logs to a location, so that incase of any issue or failure you should get the logs which shows the reason of failure.
Also for testing purpose you can add below parameter inside the IfModule
"DebugConfigInfo ON"
By which you can hit below url
http://myWebServerServerIP:WebServerPort/myApp/index.jsp?__WebLogicBridgeConfig
But this is not recommended on production.
Also we need to load the WebLogic module in the Apache by adding below entry.
LoadModule weblogic_module modules/mod_wl_20.so
"mod_wl_20.so" file can be found unders WLS_Home\server\plugin\<Your_OS>\<Whether 32 or 64 bit>
By hitting above url we will come to know that, to waht all servers Apache is able to lookup and other tcp level parameters.
That's it , restart the Apache and try to access the application via Apache.
No comments:
Post a Comment