Putting your WebSphere behind Web Server is essential for various reasons including performance, security, and scalability. If you are working as a WebSphere administrator or just started then one of the tasks you will be involved in is to connect IHS with WAS.

On high-level, you need to do following in order to implement managed web server.

  1. Download Web Server Plug-ins for WebSphere
  2. Install Plug-ins
  3. Add Web Server into WebSphere
  4. Configure Plugin into Web Server

Following abbreviations are used in this article.

  • IHS – IBM HTTP Server
  • WAS – WebSphere Application Server
  • ND – Network Deployment
  • IM – Installation Manager

This assumes you have IHS and WAS installed on Linux environment. The following demonstration is based on WebSphere ND 8.5.5 and IBM HTTP Server 8.5.5.

You may use IBM WAS with other web servers like Apache, Nginx or IIS as well. However, WebSphere is nicely integrated with IBM HTTP Server through Web Server Plug-in.

Download Web Server Plug-ins for WAS

In order to implement IHS in front of WebSphere, you need to have Web Server plugin installed. You can download the plugin from IBM website.

  • Visit the following link
https://www-01.ibm.com/marketing/iwm/iwm/web/pick.do?source=swerpws-wasnd85&S_TACT=109J87BW&lang=en_US
  • Enter your information and confirm. You will be directed to a download page where you will have two tabs. Click on “Download using http” tab.
  • Look for plug-ins and download both files

was-plug-ins

  • Once downloaded, you should have following two files. You can transfer this to IHS server.
-rw-rw-r--. 1 chandan chandan 696338913 May 10 04:52 was.repo.8550.plg.ilan_part2.zip
-rw-rw-r--. 1 chandan chandan 961156085 May 10 04:56 was.repo.8550.plg.ilan_part1.zip
  • Let’s extract both files
unzip was.repo.8550.plg.ilan_part1.zip
unzip was.repo.8550.plg.ilan_part2.zip

Install Web Server Plug-in using IM

It’s time to install the downloaded plugin through Installation Manager.

  • Launch IBM IM, usually it will be under /opt/IBM/InstallationManager/eclipse/IBMIM
  • Click on File >> Preferences
  • Click on Add Repository
  • Click on Browser and select the repository.config file, which you got after extraction
  • Click ok and OK again

ibmim-add-repository

  • Click on Install on IM Wizard

ibmim-install

  • Select the version and click Next

select-version

  • Accept the license and Next
  • Select the directory where you wish to install the plugin. By default, it will install under /opt/IBM/WebSphere/Plugins. If you are ok with it, click Next

install-directory

  • Select the 64-bit runtime environment for Java and Next
  • Review the summary and click on Install to begin the installation

begin-install

It may take some time and once done, you will get confirmation – The packages are installed. Click on Finish.

install-success

This concludes plug-in is installed successfully and time to configure them.

Add Web Server in WebSphere Console

  • Login into WebSphere Administrative Console
  • Click on Servers>>Server Types>>Web servers

add-web-servers

  • Click on New

add-new-web

  • Select node – leave it to default if IHS is running on the same server as WebSphere else select the node of web server
  • Enter the Server name
  • Select Type as “IBM HTTP Server” and click next
  • Leave the default web server template, click next

web-server-template

  • Port – if HTTP Server is running on different port than 80 then change here
  • Web server installation location – verify IHS is installed here else change the location
  • Plug-in installation location – verify if plugin is installed here else change it
  • Click next

enter-web-properties

  • Review the web server definition and click Finish

confirm-web-server

  • You will get a confirmation about new server created successfully and option to review the changes. Click on review

confirmation-web-added

  •  Select checkbox for “synchronize changes with Nodes” and click Save

sync-nodes

  • It will take few seconds to synchronize the changes. Click OK

node-synched

  • It will display the newly added web server in the list

web-server-list

It’s time to generate & propagate the plug-in now. Select the newly added web server and click on first

Generate Plug-in

And then click on

Propagate Plug-in

generate-propagate

It will take few seconds and give you plug-in path.

plugin-path

This is the plugin you need to use in HTTP Server. Let’s configure this in httpd.conf of IHS.

Add Plug-in in IHS (httpd.conf)

There are two things you need to do in httpd.conf file to make IHS talk to WebSphere using a plugin.

  1. Add mod_was_ap22_http.so
  2. Add plugin-cfg.xml path
  • Go to the conf path of IHS. By default it will be under /opt/IBM/HTTPServer/conf
  • Take a backup of httpd.conf file
  • Add following two lines
LoadModule was_app22_module /opt/IBM/WebSphere/Plugins/bin/64bits/mod_was_ap22_http.so
WebSpherePluginConfig /opt/IBM/WebSphere/Plugins/config/WebServer-1/plugin-cfg.xml

Tip: if you are not sure the file location of mod_was_ap22_http.so then you can use find command.

  • Restart HTTP server

This concludes you have successfully integrated IBM HTTP Server with IBM WebSphere Application Server.

Note: In order to have context root accessible through a web server, you must select Web Server as the target during deployment.

Whenever you add new application or changes in context root, you must generate and propagate plug-in.

So that was all for today. Hope you like this.