Thursday, January 1, 2004

Integrating Apache with WebSphere on the same box


By David Gewirtz

We at ZATZ run Apache as our primary Web server. It's tight, light, and works well for us. But we were recently wondering what would happen if we wanted to run WebSphere Application Server on the same machine. After a bit of investigation, it turned out to be both possible and pretty straightforward.

In our project, we worked with Apache 1.3 and WebSphere Application Server 3.5. First, install Apache and get it working reliably. This is the key. You want to make sure your regular Web serving environment is nice and clean.

Once you get Apache running, you're going to need to install the WebSphere Application Server. The WebSphere install will attempt to modify your Apache httpd.conf file with WebSphere-specific configuration changes. Because of this, it's a very good idea to make a copy of your httpd.conf file before installing WebSphere. For those of you not all that familiar with Apache, the httpd.conf file is the main configuration file for Apache.

Within the httpd.conf file, here are the directives that will be modified:

LoadModule app_server_module
AddModule mod_app_server.c
NcfAppServerConfig BootFile

We were using AIX on our test machine, but you're likely to be able to use similar directives (but with appropriate file locations) on other platforms that support both Apache and WebSphere.

If you're using WebSphere with Apache (or any other interesting products), please let me know what you're up to. Send a note to me at Maybe we'll feature your integration project in a future article!