Sunday, October 19, 2014

How to install Apache ANT

Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. The main known usage of Ant is the build of Java applications. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications.

How to install Apache ANT ?

Apache ANT is available in both Source and Binary Distribution.

Download the binary distribution  : http://ant.apache.org/bindownload.cgi
Download the source distribution : http://ant.apache.org/srcdownload.cgi

If we download the binary version no need to compile the source and install the ANT
  • Download the binary distribution version from Apache mirrors.
  • If we are using Linux and installed GNU tar installed  download apache-ant-1.9.4-bin.tar.gz
  • Copy to server location and gunzip it  gunzip apache-ant-1.9.4-bin.tar.gz
  • untar the file as tar -xvf apache-ant-1.9.4-bin.tar
  • set the PATH as export PATH=$PATH:/opt/Apache/apache-ant-1.9.4-bin
If we want to set the path permanently , add the below lines in your server profile

      vi .profile
      export PATH=$PATH:/opt/Apache/apache-ant-1.9.4-bin
  • Verify the ANT installation as below
    -bash-3.2$ ./ant -version
    Apache Ant(TM) version 1.9.4 compiled on April 29 2014

Weblogic deployment through wldeploy ant task

There are different types and ways to deploy the applications in weblogic .For more information please go through the link. Different Types of Deployments in Weblogic

How to deploy applications with wldeploy ant task in weblogic ?

Weblogic server provides the wldeploy ant task to perform the deployment operations.The wldeploy Ant task  performs weblogic.Deployer functions using attributes specified in an Ant XML file.

How to use the wldeploy ?

To use the wldeploy ant task , ANT should be installed. Refer the link How to install Apache ANT .
  • Verify the ANT installation as below
               -bash-3.2$ ./ant -version
                Apache Ant(TM) version 1.9.4 compiled on April 29 2014
                -bash-3.2$
  • If you get the error JAVA_HOME error as below 
             -bash-3.2$  ./ant -version
             Error: JAVA_HOME is not defined correctly.
             We cannot execute /opt/java/32bit/jdk1.6.0_31/bin/java
  • Set the JAVA_HOME  as below
            -bash-3.2$ export JAVA_HOME=/opt/install/java/32bit/jdk1.6.0_31
            -bash-3.2$ echo $JAVA_HOME
            /opt/install/java//32bit/jdk1.6.0_31
  • Create the build.xml as below
           <project name="weblogic_deployment" default="deploy">
           <target name="deploy">
              <wldeploy
                      action="deploy" verbose="true" debug="true"
                      name="example-App" source="/opt/data/applications/example-App.war"
                      user="weblogic-user" password="weblogic-password"
                      adminurl="t3://weblogic-admin-host:7001" targets="server-name"  />
              </target>
             </project>
  •  Set the weblogic environment variables , otherwise will get the below type of error.
    -bash-3.2$ ./ant deploy
        Buildfile: /opt/data/ant/apache-ant-1.9.4/bin/build.xml
       deploy:
       BUILD FAILED
       /opt/data/ant/apache-ant-1.9.4/bin/build.xml:8: Problem: failed to create task or type wldeploy
       Cause: The name is undefined.
       Action: Check the spelling.
       Action: Check that any custom tasks/types have been declared.
       Action: Check that any <presetdef>/<macrodef> declarations have taken place.
       Total time: 0 seconds
  • Set the weblogic domain environment variables as below 
          -bash-3.2$ . /opt/weblogic/domain/weblogicdomain/bin/setDomainEnv.sh
           Note: Here /opt/weblogic/domain/weblogicdomain is weblogic domain home
  • Run the ant script as 
           -bash-3.2$ ./ant deploy

Issues we may get during the deployment through wldeploy ant task

BUILD FAILED
weblogic.management.ManagementException: [Deployer:149163]The domain edit lock is owned by another session in non-exclusive mode - this deployment operation requires exclusive access to the edit lock and hence cannot proceed. If you are using "Automatically Aquire Lock and Activate Changes" in the console, then the lock will expire shortly so retry this operation.

Solution 2 : Wait until Lock& Edit available or release the Configuration changes to obtain the lock.

Solution 2 : use the usenonexclusivelock="true" to build.xml to avoid the error.

Note: If we use this option  ant will not through error but gives the warning as 
[wldeploy] [BasicOperation.execute():445] : Initiating deploy operation for app, example-App , on targets:
 [wldeploy] [BasicOperation.execute():447] :    server-name
 [wldeploy] Task 14 initiated: [Deployer:149026]deploy application example-App on server-name.
 [wldeploy] Operation is pending and will be activated or cancelled when the ongoing edit session is activated or cancelled.
  • Once the activate changes done deployment done other wise changes will not reflect.




Wednesday, October 15, 2014

Site Down Maintenance page in iPlanet

When ever your site is going to Schedule Maintenance or Down due to some issues at back end servers. Is it good to show 404 or 500 Page errors to users?. No , in this situation we need to build the custom Site Maintenance pages.

How to configure Site Maintenance Page in iPlanet?
  • Add below configuration lines in obj.conf file
        <Client urlhost="examplesite.com">
                 NameTrans fn="redirect" from="/" url="/Site_Maintenance_Page.htm"
        </Client>
  • Push or Deploy the configuration changes . No need of the server restart.
How to display the site logs or Images in Maintenance Page?
  • If you are using the images or static files to display your site Maintenance page to looks good you may face the problems.

    • How to solve it ?
      • Rewrite your static files as below
    • NameTrans fn="rewrite" from="/Site_Maintenance_Page/site_logo.png" root="/opt/iplanet" path="/Site_Maintenance_Page/site_logo.png"
    • NameTrans fn="rewrite" from="/Site_Maintenance_Page/Site_body.jpg" root="/opt/iplanet" path="/Site_Maintenance_Page/Site_body.jpg" 

 Note: Make sure Rewrite directive configuration should be placed before the redirect directive , other static images or files wont access.
  • Overall Configuration looks like
<Client urlhost="examplesite.com">
           NameTrans fn="rewrite" from="/Site_Maintenance_Page/site_logo.png" root="/opt/iplanet"                 path="/Site_Maintenance_Page/site_logo.png"

            NameTrans fn="rewrite" from="/Site_Maintenance_Page/Site_body.jpg" root="/opt/iplanet"               path="/Site_Maintenance_Page/Site_body.jpg"
            NameTrans fn="redirect" from="/" url="/Site_Maintenance_Page.htm"
</Client>

Tuesday, October 14, 2014

Tomcat Integration with iPlanet Webserver

AJP  (Apache JServ protocol ) is a communications protocol developed by apache.org to facilitate integration of the Tomcat web container with third party web servers. Web server specific AJP plugins have been developed for Apache, IIS and  iPlanet.nsapi_redirector.so Plugin developed to integrate the Tomcat server with iPlanet webserver.

How to Integrate the Tomcat server with iPlanet ?

  • Load the nsapi_redirector.so plugin and worker.properties in magnus.conf file 
Init fn="load-modules" funcs="jk_init,jk_service" shlib="/opt/iplanet//lib/nsapi_redirector.so"
Init fn="jk_init" worker_file="/opt/iplanet/worker.properties" log_level="debug" log_file="/opt/iplanet/nsapi.log"
  • Create the Worker Properties file 
/opt/iplanet/worker.properties
------------------------------------------------
# List of workers for handling incoming requests
worker.list=Worker1
worker.Worker1.host=Tomcat-Host-name.com
worker.Worker1.port=8009
worker.Worker1.type=ajp13
worker.Worker1.cachesize=100
worker.Worker1.lbfactor=1
  • Add NameTran function in obj.conf file
         NameTrans fn="assign-name" from="/Tomcat-app/*" name="Tomcat-app"
        <Object name="Tomcat-app">
            Service fn="jk_service" worker="Worker1"
      </Object>

Note: If you have custom Custom-obj.conf file (Virtual servers) and has client configuration your  Reverse proxy configuration is as below.
Custom-obj.conf
-----------------------------------------------------
<Object name="default">
     <Client urlhost="example-server.com">
          NameTrans fn="assign-name" from="/Tomcat-app/*" name="Tomcat-app"
     </Client>
</Object>

<Object name="Tomcat-app">
         Service fn="jk_service" worker="Worker1"
</Object>

Friday, October 10, 2014

Reverse Proxy configuration in iPlanet Web server

A Reverse Proxy is a type of server that retrieves resources from other servers on behalf of the client. The resources are returned to the client as though they are originated from the server itself. Client feels that the resources are being provided by the server itself, and unaware of the servers that have provided the resources.Forward proxy acts as an intermediary for its clients and returns the resources accessible on the internet.Reverse proxy acts as an intermediary for the servers to return the resources provided by other servers.Reverse proxy is most widely used when you want your application accessible in the internet, without exposing the Application Servers, in other words, it is used when you want your intranet application to be accessible through internet.The proxied server may be a webserver itself, or it may be an application server using a different protocol, or an application server.


How to Configure Reverse Proxy in iPlanet?

iPlanet 7 and above versions has inbuilt proxy plugins , so no need to load any plugins or libraries.
  • Add below configuration lines in obj.conf file.
          NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
             <Object name="reverse-proxy">
                  Route fn="set-origin-server" server="http://backendserver.com"
             </Object>

            <Object ppath="http:*">
                Service fn="proxy-retrieve" method="*"
            </Object>
  • Push/ Deploy the changes in iPlanet console. No need of restart.
Note: If you have custom Custom-obj.conf file (Virtual servers) and has client configuration your  Reverse proxy configuration is as below.

Custom-obj.conf
-----------------------------------------------------
<Object name="default">
     <Client urlhost="Reverse-Proxy-server.com">
          NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
     </Client>
</Object>

<Object name="reverse-proxy">
          Route fn="set-origin-server" server="http://backendserver.com"
</Object>

<Object ppath="http:*">
          Service fn="proxy-retrieve" method="*"
</Object>

Note:  Only one ppath="http:*" is required for multiple Reverse Proxy configuration. No need to duplicate the ppath block every time.

How Reverse Proxy works ?

When request comes to iplanet let ex http://Reverse-Proxy-server.com/Revese_Proxy
  • The default object NameTrans  directive  map  attribute function will be execute and  convert the logical URL of the request to a physical path name.
NameTrans fn="map" from="/Revese_Proxy" name="reverse-proxy" to="http:/Revese_Proxy"
  • If this physical path name (http:/Revese_Proxy) matches the  Object ppath="http:*" , ppath object directive proxy-retrieve function will be execute.
             <Object ppath="http:*">
                   Service fn="proxy-retrieve" method="*"
             </Object>

  • proxy-retrieve
    • The proxy-retrieve function retrieves a information from a remote server and returns it to the client. This function also enables you to configure the server to allow or block arbitrary methods. This function only works on the HTTP protocol.
  • After execution of the ppath Object proxy-retrieve  function ,process goes to the Object name="reverse-proxy" block.
               <Object name="reverse-proxy">
                    Route fn="set-origin-server" server="http://backendserver.com"
               </Object>
  • Route fn="set-origin-server
    • Set the back end  server information where to send the request .

 Alternative ways to configure the Reverse Proxy in iPlanet

  • Below configuration works same as above one but difference is removed the name attribute in NameTrans  and added the Route function in ppath Object.
           <Object name="default">
                  <Client urlhost="Reverse-Proxy-server.com">
                        NameTrans fn="map" from="/Revese_Proxy"  to="http:/Revese_Proxy"
                  </Client>
           </Object>

          <Object ppath="http:*">
                 Service fn="proxy-retrieve" method="*"
                 Route fn="set-origin-server" server="http://backendserver.com"
         </Object>

Thursday, October 9, 2014

Reverse Proxy configuration in Apache

A Reverse Proxy is a type of server that retrieves resources from other servers on behalf of the client. The resources are returned to the client as though they are originated from the server itself. Client feels that the resources are being provided by the server itself, and unaware of the servers that have provided the resources.Forward proxy acts as an intermediary for its clients and returns the resources accessible on the internet.Reverse proxy acts as an intermediary for the servers to return the resources provided by other servers.Reverse proxy is most widely used when you want your application accessible in the internet, without exposing the Application Servers, in other words, it is used when you want your intranet application to be accessible through internet.The proxied server may be a webserver itself, or it may be an application server using a different protocol, or an application server.


How to configure Reverse Proxy in Apache ?

  • Below Modules developed for Reverse proxy configuration in Apache
    • proxy_module               mod_proxy.so
    • proxy_http_module       mod_proxy_http.so  
  • Load the modules in httpd.conf file as below
    • LoadModule proxy_module       modules/mod_proxy.so
    • LoadModule proxy_http_module  modules/mod_proxy_http.so
  • Add the below configuration lines in httpd.conf file
             <Location /Reverse_Proxy/>
                   ProxyPass                http://backenserver.com/Reverse_Proxy/
                  ProxyPassReverse   http://backenserver.com/Reverse_Proxy/
            </Location>

Note: If Virtual hosts configured in Apache webserver place the above block of statements in Virtual host block.

<VirtualHost *:80>
          ServerName  myserver.com
    <Location /Reverse_Proxy/>
          ProxyPass                http://backenserver.com/Reverse_Proxy/
          ProxyPassReverse   http://backenserver.com/Reverse_Proxy/
     </Location>
</VirtualHost>

How Reverse Proxy Works ?

When request comes to Apache webserver it  checks for the context path in httpd.conf file and takes the  back end server information in Reverse proxy configuration block .Reverse Proxy module  sends the request to the back end (proxy server) and get the response from back end server and give to the client.

Is Context Path in Location tag and Context path of Back end server Should be same ?
No need to be same. We can change the context path in the Location tag as per our requirements.

Note: Back end server Context Path Should be valid one otherwise we wont get the results.

<VirtualHost *:80>
           ServerName  myserver.com
    <Location /Test_Reverse_Proxy/>
          ProxyPass                http://backenserver.com/Reverse_Proxy/
          ProxyPassReverse   http://backenserver.com/Reverse_Proxy/
     </Location>
</VirtualHost>
  • http://myserver.com/Test_Reverse_Proxy
  • http://myserver.com/Reverse_Proxy
 Both URL's gives the same results because both are accessing same back end servers

Note: Apache modules are Operating System's Specific so we should  load the Apache OS Specific Modules.

Wednesday, October 8, 2014

Disk Space Monitoring script

Disk space is the amount of data stored in a Disc Mount in Operating systems.Monitoring the disc space is important to avoid the issues to current running services.
  • Disc_Space_Monitoring script.sh
#!/bin/bash
HOSTNAME=`/usr/bin/hostname`

#Specify the mounts names below
Mount[0]=/devices
Mount[1]=/dev
Mount[2]=/temp

# Values which we need to get the alerts when mount reached to that level (%)
Threshold_value=40

Subject="Disk Space Monitoring alert"
ToList="admin@blog.com admin2@blog.com"
Sender="discgroup@blog.com"

Message="Your Custom Message"

for i in "${Mount[@]}"
do
       Mount_value=`df -h $i | awk '{print$5}' | tail -1 | cut -d '%' -f 0-1`
if [ "$Mount_value" -ge "$Threshold_value" ]; then
     
echo $Message | /usr/bin/mailx -s "$Subject" -r "$Sender" "$ToList"
fi
done
  • Enable the crontab utility  and add the below configuration line
0,15,30,45,50 * * * * cd /data/Disc_Space_Monitoring script; ksh Disc_Space_Monitoring script.sh
 >/dev/null 2>&1

Note: To know more about Crontab  Please refer the link Crontab







Monday, October 6, 2014

VI commands

  • vi test.txt     > create the file using the vi command
  • :q!                > quit the VI editor without save
  • :wq!             > save and quit the VI editor
  • shift + g (G) > Move  the cursor to the end of the file
  • g                  > Move cursor to the first line of the file
  • i                   >The characters typed in will be inserted before the current cursor position
  • I                   >The characters typed in will be inserted in first of the current line
  • Shift + A     >The characters typed in will be inserted in end of the current line
  • x                  > Delete the  character under the cursor
  • {number}x  > Delete the character under the cursor and next n number right characters
  • X                 >Delete the  character before the cursor
  • {number}X > Delete the n number characters before the cursor position (Not the cursor)
  • u                  >Undo the last change to the file. Typing u again will re-do the change. 
  • dd                > Delete the current line 
  • {number}dd > Remove the n number of lines down wards include current line
  • d{number}k > Delete the n  number of above lines including current line
  • d{number}j  > Delete the n number of down lines including current line
  • :3,18d        >delete lines 3 through 18
  • :1,$d              > Delete the all lines in file
  • :n  + Enter    > Go to nth line in a file Ex; :10 + ENTER
  • h                    >Move the cursor to the left one character position. 
  • j                     >Move the cursor down one line. 
  • k                    >Move the cursor up one line. 
  • l                     >Move the cursor to the right one character position. 
  • d^                  >Deletes from current cursor position to the beginning of the line. 
  • d$                  >Deletes from current cursor position to the end of the line. 
  • dw                  >Deletes from current cursor position to the end of the word. 
  • db                  > Deletes from current cursor position to the starting of the word
  • :1,$s/up/right/ > To Replace string Ex:1,$s/test1/test2
  • 16,25m30  > Move lines 16 through 25 to after line 30
  • 23,29co62 > Copy specified lines and place after line 62

Friday, October 3, 2014

Weblogic integration with Apache webserver

weblogic_module Module developed to integrate the weblogic application server with Apache webserver. Module version varied according with Apache version.

  • For 2.0.x Apache  : mod_wl_20.so
  • For 2.2.x Apache  : mod_wl_22.so
Weblogic_module  plugin available at weblogic installation package or can be download from Apache download Mirrors.

{Installation Path}/wlserver_10.3.5/server/plugin/solaris/sparc/mod_wl_20.so
{Installation Path}/wlserver_10.3.5/server/plugin/solaris/sparc/mod_wl_22.so

{Installation Path}/wlserver_10.3.5/server/plugin/linux/x86_64/mod_wl_20.so
{Installation Path}/wlserver_10.3.5/server/plugin/linux/x86_64/mod_wl_22.so

Note: Plugin is operating system specific so we  should use the Apache webserver  operating system specific plugin.

Steps to integrate Weblogic application server with Apache
  • Load the weblogic_module as below in httpd.conf file.
            LoadModule weblogic_module /modules/mod_wl_20.so
  • Add the below configuration tags in httpd.conf file.
  <Location /weblogic_app >
SetHandler weblogic-handler
WLLogFile /apache/2.0.55/logs/wlproxy.log
WLProxySSL ON
WebLogicCluster weblogic-server1.com:7009,weblogic-server2.com:7009
 </Location>

Note: If Virtual hosts has configured , place the above configuration in virtual host tag 

# Ensure that Apache listens on port 80
Listen 8080

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:8080

<VirtualHost *:8080>
ServerName www.weblogic.com
  <Location /weblogic_app >
SetHandler weblogic-handler
WLLogFile /apache/2.0.55/logs/wlproxy.log
WLProxySSL ON
WebLogicCluster weblogic-server1.com:7009,weblogic-server2.com:7009
 </Location>
</VirtualHost>

  • Restart the Apache server to reflect the changes
Note: The above configuration is for weblogic clustered servers. If we have more managed servers in a weblogic cluster use the configuration as below 

WebLogicCluster weblogic-server1.com:7009,weblogic-server2.com:7009,weblogic-server3.com:7009,weblogic-server4.com:7009

<Location /weblogic_app >
SetHandler weblogic-handler
WLLogFile /apache/2.0.55/logs/wlproxy.log
WLProxySSL ON
WebLogicCluster weblogic-server1.com:7009,weblogic-                                                                         server2.com:7009,weblogic-server3.com:7009,weblogic-server4.com:7009
 </Location>

  • If we want to integrate  the standalone or single weblogic server instance use the below configuration.
  <Location /Single_weblogic_app>
SetHandler weblogic-handler
WebLogicHost weblogic-single_app.com
WebLogicPort 7009
 </Location>


Thursday, October 2, 2014

Websphere application server (WAS) integration with Apache Webserver

WAS plugins  developed to integrate the websphere application server with Apache server.WAS plugins vary according with Apache webserver version.

  • 2.0.x Apache version mod_was_ap20_http.so
  • 2.2.x Apache version mod_was_ap22_http.so
Plugins available along with WAS installation software package or can be download from IBM download mirrors.

WAS plugins location in installation package

{Installation Package}/plugin/plg.webserverplugins.pak/repository/plugins.http/bin/mod_was_ap20_http.so
.{Installation Package}/plugin/plg.webserverplugins.pak/repository/plugins.http/bin/mod_was_ap22_http.so

Add the below configuration lines in  httpd.conf file to Integrate the Websphere Application server with Apache webserver

LoadModule was_ap20_module  modules/mod_was_ap20_http.so

WebSpherePluginConfig  modules/plugin-cfg.xml

Note: WAS plugin is operating system specific so we should place the same os specific file other wise we can get the below error.

Syntax error on line 56 of /apache/2.0.55/conf/httpd.conf:
Cannot load /apache/2.0.55/modules/mod_was_ap20_http.so into server: /apache/2.0.55/modules/mod_was_ap20_http.so: wrong ELF class: ELFCLASS32

Tuesday, September 30, 2014

Tomcat integration with Apache webserver

AJP (Apache JServ protocol) is a communications protocol developed by apache.org to facilitate integration of the Tomcat container with third party web servers.Web server specific AJP plugins have been developed for Apache, IIS and Netscape's iPlanet.mod_jk.so  module developed to integrate the Apache web server with Tomcat container.

Steps to integrate the Apache webserver with Tomcat Container

  • Load the module as below in httpd.conf file

                 LoadModule jk_module modules/mod_jk.so

  • Add the below entry in httpd.conf file

Note: If virtual hosts configured , place the below configuration in virtual host block

<IfModule mod_jk.c>
     
      JkWorkersFile /data/apache/http-2.0.0.3/conf/workers.properties
      JkLogFile /data/apache/http-2.0.0.3/logs/mod_jkLog.log
      JkShmFile /tmp/jk-runtime-status
      JkLogLevel info
      JkMount /singleapp* Server-s
      JkMount /clusterapp* Server-c
   
</IfModule>

Create the worker.properties file as below 

workers.properties
-------------------------------------
worker.list=Server-s,Server-c  (Worker Nodes)
worker.Server-c.type=lb
worker.Server-c.balanced_workers=Server-c1, Server-c2 (Clustered Nodes)
worker.Server-c.sticky_session=1

worker.Server-c1.port=8009
worker.Server-c1.host=Server-c1.com
worker.Server-c1.type=ajp13
worker.Server-c1.lbfactor=1
worker.Server-c1.ping_mode=A

worker.Server-c2.port=8009
worker.Server-c2.host= Server-c2.com
worker.Server-c2.type=ajp13
worker.Server-c2.lbfactor=1
worker.Server-c2.ping_mode=A

worker.Server-s.port=8009
worker.Server-s.host=Server-s.com
worker.Server-s.type=ajp13
worker.Server-s.lbfactor=1
worker.Server-s.ping_mode=A

Server-s is single node and pointing to single tomcat server
Server-c is Cluster node and pointing to two clustered tomcat servers

Wednesday, September 10, 2014

Windows Command to get the list of file names in a folder


Open up your command prompt by typing cmd in the run dialog box and hitting Enter

Navigate to the directory which has the files and type the following command 

DIR /B /O:N   It will display the list of file names in current directory

DIR /B /O:N /S It will display the list of file names including sub directories

DIR /B /O:N > filename.txt  It will redirect the output to text file

To save file names from any sub-directories in the current folder, just add /S like 
This will save all the file names in the current directory to a text file. The text file will be saved in the same directory. 



Sunday, August 31, 2014

WLST script to change the weblogic admin password

WLST script to change the weblogic admin password

Note: This will work not only for admin server also works for other users present in DefaultAuthenticator

Prepare the shell script to set up the environmental variables and to invoke the wlst

PasswordChange.sh
----------------------------------------

#WL_HOME="Weblogic Home"
WL_HOME=/usr/weblogic/wlserver_10.3"

#JAVA_HOME="java Home"
JAVA_HOME="/usr/java"

# set up common environment
. "${WL_HOME}/server/bin/setWLSEnv.sh"

"${JAVA_HOME}/bin/java"  weblogic.WLST PasswordChange.py

PasswordChange.properties
-------------------------------------------

Weblogic_Admin_URL=t3://weblogic.com:9001
Weblogic_username=weblogic
Weblogic_password=weblogiccurrent
New_Weblogic_password=newPassword
domainName=weblogicdomainname

PasswordChange.py
-------------------------------------------
loadProperties("PasswordChange.properties")
connect(Weblogic_username,Weblogic_password,Weblogic_Admin_URL)
cd('/SecurityConfiguration/'+domainName+'/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
cmo.resetUserPassword(Weblogic_username,New_Weblogic_password)
disconnect()
exit()

  • Changes will reflect immediately so no need to restart the server.
  • Update the new password in boot.properties if exist to avoid issue during the server start up.
  • we can also reset the user password through admin console
  • Navigate to security Relams --> myrelam -->users and groups
  • select the user and update the new password


Sunday, August 24, 2014

Apache web server plugins


  •  mod_wl_20.so : To integrate with weblogic application server
  • mod_jk.so : To integrate with Tomcat server
  • libmod_sm20.so: Site minder

Sunday, July 6, 2014

Cache controls for static files in iPlanet (Sun One Webserver)

Browser caching behavior is also subject to Web server settings for static file caching. Appropriate settings allow files that are rarely updated, such as image files, JavaScript files, or style sheet files, to be cached on the browser. Caching static files reduces network utilization and enhances Web Client response time.

  • we can enable the cache control for iplanet web server by adding  below tags in obj.conf file 


<If $path =~ "^(.*)(\\.)(jpg|jpeg|gif|png|js|css|woff)$">

      ObjectType fn="set-variable" insert-srvhdrs="Expires:$(httpdate($time + 64000))"
      ObjectType fn="set-cache-control" control="public,max-age=64000"

</If>
  • We can verify the Cache controls in web browser HTTP headers.







                                

Friday, July 4, 2014

Disable / enable a Web Agent (Siteminder Agent)

Disable a Web Agent (Disable sso protection)

Change the below parameter in WebAgent.conf

EnableWebAgent="NO"


Enable a Web Agent (Enable  sso protection)

Change the below parameter in WebAgent.conf

EnableWebAgent="YES"


Restart the Services to reflect the changes.