Installing and Configuring the Apache Web Logic Plugin 64 Bit
Pre-Requisite
1. Download the Oracle Apache Web Logic Plugin
2. Configure SSL for Web Logic
3. Get the Root CA from the Certificate Authority
4. Install the Java and Export the JAVA_HOME as environment variables.
Configuration
1. Extract WebLogic Apache Plugin Zip File
In the plugin zip bundle and choose the right version of apache plugin zip file and extract the zip file. In my example apache version is 2.2 64 bit and the extract zip file name is WLSPlugin11g-64bit-Apache2.2-linux64-x86_64.zip file. After Extracting the zip file and the WLS Plugin Directory Structure look like this.
2. Exporting the LD_LIBRARY_PATH
Login as a root or sudo user and Go to the /etc directory and edit the profile directory and add the LD_LIBARY_PATH at the end of the file.
LD_LIBRARY_PATH="/opt/shibboleth-sp/lib:/etc/httpd/modules:/root/soft/wls/lib"
export LD_LIBRARY_PATH
In the above configuration, I have highlighted the weblogic apache plugin lib directory location where my plugin lib directory resides.
3. Configuring the Web Logic Wallet
Go to the Weblogic Plugin Extracted Directory and perform the following configuration tasks to create the wallet and add the root certificate to the wallet.
3.1 Creating the Web Logic Wallet
Run the following command to create the wallet.
./bin/orapki wallet create -wallet my-wallet -auto_login_only
After running the command and it will create the my-wallet directory and also it create the cwallet.sso file inside the my-wallet directory.
3.2 Add the Root CA to the
Run the following command to add the root certificate into the my-wallet.
./bin/orapki wallet add -wallet my-wallet -trusted_cert -cert ca.crt -auto_login_only
In the above configuration, the root ca certificate is ca.crt. If you already configure the ssl for web logic and the root certificate is available in the trusted store.
4. Configure the weblogic.config file
Go to the Weblogic Plugin Extracted Directory and create the wls.config file and perform the following task to configure the weblogic plugin.
4.1 Load the Web Logic Module
LoadModule weblogic_module <Web Logic Module File.sso>
4.2 Configure the Web Logic Plugin If Module
Add the following content into the file and turn on the SecureProxy and Specify the wallet location
<IfModule mod_weblogic.c>
Debug ALL
DebugConfigInfo On
WLLogFile /tmp/wl-proxy.log
KeepAliveEnabled ON
SecureProxy ON WLSSLWallet <Web Logic Wallet Location>
</IfModule>
4.3 Configure the Apache routing to Web Logic
<Location / >
SetHandler weblogic-handler
WebLogicHost <Web Logic Host>
WebLogicPort <WebLogic SSL Port>
</Location>
Configure the Host and Web Logic SSL Port.
4.4 Sample wls.config File
After configuring the wls.config file as follows.
LoadModule weblogic_module /root/soft/wls/lib/mod_wl.so
<IfModule mod_weblogic.c>
Debug ALL
DebugConfigInfo On
WLLogFile /tmp/wl-proxy.log
KeepAliveEnabled ON
SecureProxy ON
WLSSLWallet /root/soft/wls/my-wallet
</IfModule>
<Location / >
SetHandler weblogic-handler
WebLogicHost 192.168.56.101
WebLogicPort 4430
</Location>
5. Including wls.config file in httpd.conf file
Login as a root and modify the httpd.conf file in the /ete/httpd/conf directory. Add the following content in the Include section in the httpd.conf file.
Include /root/soft/wls/wls.config
In the above configuration, /root/soft/wls/wls.config is my sample wls.conf file. Please replace with your sample config file location.
6. Restart the Apache Server
service httpd restart
7. Enabling the Web Logic Plugin in the Weblogic Admin Console
Login to the Web Logic Admin Console and navigate the following location and Enable the Web Logic Plugin
7.1 Click Lock and Edit button to modify the weblogic configuration
7.2 Navigate the Environment --> Servers and It will display the following screen.
My Server Name is PIA(admin). Click the PIA(admin) Server and It will display the following screen.
Click the Advanced Button and Enable the WebLogic Plug-In Enabled check box. After enable the WebLogic Plug-In Enabled check box and the screen should like this.
Click Save Button and Restart the Web Logic Server to effect the changes.
8. Testing the Web Logic Apache Plugin
Open the browser and enter the https://<HostName>/console in the URL. In my example my url is https://pspt.liyaqat.com/console/. After entering the url and it will display the following screen.
9. Common Errors
Problem: mod_weblogic(ssl): Cannot Load library: libwlssl.so
Cause: The weblogic apache plugin lib directory not available in the LD_LIBRARY_PATH
Solution:
9.1 Go to the /etc/ directory and edit the profile file. Add the LD_LIBRARY_PATH path variable and Export the LD_LIBRARY_PATH of the weblogic apache plugin lib directory and restart the apache web server
9.2 Some times LD_LIBRARY_PATH not able to visible to your apache web server. Please add the LD_LIBRARY_PATH in the following location to load the LD_LIBRARY_PATH.
Go to the /etc/init.d directory and edit the functions file and add the LD_LIBRARY_PATH into the functions file.
The Sample LD_LIBRARY_PATH as follows.
export LD_LIBRARY_PATH=/opt/shibboleth-sp/lib:/etc/httpd/modules:/root/soft/wls/lib
The highlighted the weblogic plugin library directory
Restart the Apache Web Server and the issue will be resolved.
Pre-Requisite
1. Download the Oracle Apache Web Logic Plugin
2. Configure SSL for Web Logic
3. Get the Root CA from the Certificate Authority
4. Install the Java and Export the JAVA_HOME as environment variables.
Configuration
1. Extract WebLogic Apache Plugin Zip File
In the plugin zip bundle and choose the right version of apache plugin zip file and extract the zip file. In my example apache version is 2.2 64 bit and the extract zip file name is WLSPlugin11g-64bit-Apache2.2-linux64-x86_64.zip file. After Extracting the zip file and the WLS Plugin Directory Structure look like this.
2. Exporting the LD_LIBRARY_PATH
Login as a root or sudo user and Go to the /etc directory and edit the profile directory and add the LD_LIBARY_PATH at the end of the file.
LD_LIBRARY_PATH="/opt/shibboleth-sp/lib:/etc/httpd/modules:/root/soft/wls/lib"
export LD_LIBRARY_PATH
In the above configuration, I have highlighted the weblogic apache plugin lib directory location where my plugin lib directory resides.
3. Configuring the Web Logic Wallet
Go to the Weblogic Plugin Extracted Directory and perform the following configuration tasks to create the wallet and add the root certificate to the wallet.
3.1 Creating the Web Logic Wallet
Run the following command to create the wallet.
./bin/orapki wallet create -wallet my-wallet -auto_login_only
After running the command and it will create the my-wallet directory and also it create the cwallet.sso file inside the my-wallet directory.
3.2 Add the Root CA to the
Run the following command to add the root certificate into the my-wallet.
./bin/orapki wallet add -wallet my-wallet -trusted_cert -cert ca.crt -auto_login_only
In the above configuration, the root ca certificate is ca.crt. If you already configure the ssl for web logic and the root certificate is available in the trusted store.
4. Configure the weblogic.config file
Go to the Weblogic Plugin Extracted Directory and create the wls.config file and perform the following task to configure the weblogic plugin.
4.1 Load the Web Logic Module
LoadModule weblogic_module <Web Logic Module File.sso>
4.2 Configure the Web Logic Plugin If Module
Add the following content into the file and turn on the SecureProxy and Specify the wallet location
<IfModule mod_weblogic.c>
Debug ALL
DebugConfigInfo On
WLLogFile /tmp/wl-proxy.log
KeepAliveEnabled ON
SecureProxy ON WLSSLWallet <Web Logic Wallet Location>
</IfModule>
4.3 Configure the Apache routing to Web Logic
<Location / >
SetHandler weblogic-handler
WebLogicHost <Web Logic Host>
WebLogicPort <WebLogic SSL Port>
</Location>
Configure the Host and Web Logic SSL Port.
4.4 Sample wls.config File
After configuring the wls.config file as follows.
LoadModule weblogic_module /root/soft/wls/lib/mod_wl.so
<IfModule mod_weblogic.c>
Debug ALL
DebugConfigInfo On
WLLogFile /tmp/wl-proxy.log
KeepAliveEnabled ON
SecureProxy ON
WLSSLWallet /root/soft/wls/my-wallet
</IfModule>
<Location / >
SetHandler weblogic-handler
WebLogicHost 192.168.56.101
WebLogicPort 4430
</Location>
5. Including wls.config file in httpd.conf file
Login as a root and modify the httpd.conf file in the /ete/httpd/conf directory. Add the following content in the Include section in the httpd.conf file.
Include /root/soft/wls/wls.config
In the above configuration, /root/soft/wls/wls.config is my sample wls.conf file. Please replace with your sample config file location.
6. Restart the Apache Server
service httpd restart
7. Enabling the Web Logic Plugin in the Weblogic Admin Console
Login to the Web Logic Admin Console and navigate the following location and Enable the Web Logic Plugin
7.1 Click Lock and Edit button to modify the weblogic configuration
7.2 Navigate the Environment --> Servers and It will display the following screen.
My Server Name is PIA(admin). Click the PIA(admin) Server and It will display the following screen.
Click the Advanced Button and Enable the WebLogic Plug-In Enabled check box. After enable the WebLogic Plug-In Enabled check box and the screen should like this.
Click Save Button and Restart the Web Logic Server to effect the changes.
8. Testing the Web Logic Apache Plugin
Open the browser and enter the https://<HostName>/console in the URL. In my example my url is https://pspt.liyaqat.com/console/. After entering the url and it will display the following screen.
9. Common Errors
Problem: mod_weblogic(ssl): Cannot Load library: libwlssl.so
Cause: The weblogic apache plugin lib directory not available in the LD_LIBRARY_PATH
Solution:
9.1 Go to the /etc/ directory and edit the profile file. Add the LD_LIBRARY_PATH path variable and Export the LD_LIBRARY_PATH of the weblogic apache plugin lib directory and restart the apache web server
9.2 Some times LD_LIBRARY_PATH not able to visible to your apache web server. Please add the LD_LIBRARY_PATH in the following location to load the LD_LIBRARY_PATH.
Go to the /etc/init.d directory and edit the functions file and add the LD_LIBRARY_PATH into the functions file.
The Sample LD_LIBRARY_PATH as follows.
export LD_LIBRARY_PATH=/opt/shibboleth-sp/lib:/etc/httpd/modules:/root/soft/wls/lib
The highlighted the weblogic plugin library directory
Restart the Apache Web Server and the issue will be resolved.
Nice articel, This article help me very well. Thank you. Also please check my article on my site Know All About Htaccess Tutorial. In link article we will learn about How to use .htaccess file?.
ReplyDeleteI loved your post.Much thanks again. Fantastic.
ReplyDeletelinux training