Problem solve Get help with specific problems with your technologies, process and projects.

Apache HTTP Server drives Web sites everywhere

Get all the facts on Apache HTTP server in this tip from Jim Mason. Learn what it is, where to get it, how to install it on Windows, how to troubleshoot problems and more.

You've heard about Apache HTTP Server, but you aren't sure what it is or if it's something your shop should consider. Well, this tip should help. Learn what it is, where to get it, how to install it on Windows, how to troubleshoot problems and more.

To begin with, Apache HTTP Server is available for download from the Apache Software Foundation at as a no-charge license program.

IBM also distributes a version of the Apache HTTP Server for the iSeries available through your business partner. While the iSeries offers an excellent version of the Apache HTTP Server (great performance, easy administration) as a no-charge licensed program, this tip looks at installing and using the Windows version here as an option if you need to serve Windows applications on the Web or you don't have existing capacity on your iSeries to run a Web server and don't want to upgrade.

Jim Mason

What a Web server does

Basically, a Web server maps URL requests from a Web client (typically a Web browser) to a resource or service that will handle that request and return a response to the user. The Web client (a browser or a client application) and the Web server use the HTTP protocol (Hyper Text Transfer Protocol) to communicate over a TCP network. The protocol is a request/response protocol much like client/server was except this runs over any network model: LANs and WANs.

There are many optional configurations supporting different features: CGI (Common Gateway Interface) for running CGI programs, proxy serving, secure serving, database serving, scripting engines like Perl, caching, and plug-ins for Web application servers such as Tomcat and WebSphere that run Java Web applications.

When you enter a valid URL such as in your Web browser, the request is directed to a Web server (such as Apache) to handle the request. Here, my Apache Web server returns the default home page for our company Web site.

Choosing a platform for Web serving

For Web serving with an iSeries, you have several choices. You can always use the IBM version (5722-DG1). It's a no-charge license program your business partner can order for you if you don't have it. You could also download a Linux distribution from Apache and run it under a Linux partition on the iSeries. Finally, you can download Apache and run it on another server (Windows, Linux, Unix, etc.).

Why Apache? It runs the vast majority of the world's Web servers (Over 70% today and growing. Microsoft IIS is a distant second.), it's packed with many advanced features, it has common administration across all server platforms, it makes your Web applications portable, it's easy to setup and use, it's open-source and standards-based, and it can be easily installed from a binary download file or compiled to create a custom server setup as needed.

Which is best? That depends on your specific needs

If ease of administration is important, the iSeries Apache Web administration interface is the easiest to use. It has wizards and task-oriented screens to help you simplify the server administration process. Also, the IBM iSeries HTTP Server (powered by Apache) -- also known as the iSeries Apache Server -- is a no-charge license program, so you're only real cost is the iSeries processing power to run the server.

If cost is a significant factor, running your Web server on a Linux/Intel platform is very low cost for smaller implementations, saving significant money over more expensive platforms such as Windows and iSeries. Most iSeries shops don't have Linux skills, so it's common to have a business partner setup the Linux system with the Apache HTTP Server, an application server (like Apache Tomcat or IBM WebSphere Express) and a local database (such as MySQL or IBM DB2). The Apache Tomcat server and MySQL are no-charge license program options. The only licensed software a customer might need is the Linux distribution (Red Hat, SUSE or Caldera) if you're not using one of the free ones (United Linux, Debian).

If you want Web serving on Windows, I've found Apache HTTP Server to be a better choice than IIS. Apache is portable, has many common plug-ins with other tools and middleware, performs well, is easy to setup and administer, includes many features (proxy server, SSL, etc.) that Microsoft sells as an additional server software license (Internet Security and Acceleration (ISA) Server 2000 Feature Pack 1), runs Web applications on Windows well and works better with an iSeries server for data and applications.

Another viable option for Web applications that can be externally managed is a managed hosting facility to run Linux servers. They are relatively inexpensive and can relieve you of much of the burden of managing your Linux server.

Apache on Windows

Installing Apache from a binary distribution

While you can download Apache source and compile your own custom version of Apache with selected modules, it's easier to start with a binary distribution for your platform to learn about Apache. You should also run it on NT, 2000 or XP as opposed to the older operating systems.

Summary of the steps to install a binary distribution on Windows:

  1. Download the binary distribution file for Windows.

  • Double-click the distribution file to start the install wizard for Windows. You'll pick an installation directory and decide whether to run the Apache server as a Windows service or let it interact with the desktop. The configuration file will be updated automatically.

  • Start the Apache server. As a service, open the Windows Administration Services manager and start the Apache service. As a desktop application, go to the bin directory for your Apache installation and click on Apache.exe.

  • Open a Web browser and enter the URL
    http:// /index.html.en
    or http:// /index.html.en
    The default home page for your Apache server opens. You can click the documentation link to access all the Apache server documentation locally.

Troubleshooting Apache on Windows

Backup of configuration files

By default, all the Apache configuration files have a backup for the default version in your /conf directory. If you make changes that don't work and can't figure out how to correct it easily, you can just copy the backup config files over the ones you changed and start over.

Debugging Apache server startup problems

If Apache fails as a service, check the Application Event log to see the cause. Generally, the failure comes from a parse error or runtime error on httpd.conf .

After I made configuration changes and restarted my Apache server, a system dialog box popped up with the error: 'Apache service failed to start with service-specific error 1'.

Switching to the Windows Application Event viewer, I found a very clear message:
Apache server syntax error on line 180 of httpd.conf

On line 180, I had uncommented '#ExtendedStatus' on by removing the leading # to see if I could get more information in the server logs. I didn't realize I needed to uncomment the corresponding module that provided that service so my server failed to start.

I then uncommented the following module in httpd.conf by removing the leading #:
LoadModule status_module modules/

Problem solved.

Debugging Apache server runtime problems

There are three log files to look at in the /logs directory:

  • Install
    Has install information. Only useful to see how install went.

  • Access
    Has all access information on users accessing resources. The ExtendedStatus option above also shows threading and loading of resources (usually not necessary).

  • Error
    The error log shows all runtime errors that occur in an application. If you receive a page not found (404) or page not authorized (403) error in your browser, look here for more information.

Plugging in a Java Web application server

There are many Java Web application servers based on the J2EE standard that can be plugged in to the Apache HTTP Server: Apache Tomcat, IBM WebSphere Express and IBM WebSphere Application Server, among others. Apache Tomcat is a no-charge license program from

Basically, when you "plug in" a Web application server, you are adding a module to the server that will redirect specific types of requests to the Web application server to handle. The response is generated and returned to the Web client. The Apache server may be set up to pass the following types of requests to a Web application server: *.html (a Web page), *.jsp (a Java Server Page), /servlet/* (a Java servlet).

Better Web application servers actually include a built-in Apache Web server that is configured automatically as part of the Web application server. Tomcat, WebLogic, Jrun and others have done this for years. IBM's WebSphere finally caught up to those others in version 5 supporting the HTTP protocol as the built-in transport medium. Earlier versions of WebSphere didn't perform as well and were more difficult to configure.

If you're setting up a simple Web application server configuration today, you normally don't have to install Apache HTTP Server separately.

For more on Apache software, visit And for more on iSeries Web development, visit


About the author: Jim Mason, president of ebt-now, is an iSeries WebSphere engineer. ebt-now provides iSeries WebSphere, WebFacing project management, engineering, development and training services.


  • Access WebSphere from multiple HTTP servers
    Did you know you can access the WebSphere Application Server from multiple HTTP servers running on the same or different iSeries machines? That's something you may want to consider if you want to isolate the compute-intensive resources of WebSphere Application Server or if you want to isolate WebSphere resources from user access for security reasons.

  • Basic WebSphere troubleshooting concepts
    If you're new to WebSphere, you're bound to come upon some problems that you need help figuring out. This tip introduces WebSphere basic concepts and a simple process to help identify some WebSphere configuration problems quickly.

  • Microsoft pushes security in IIS 6.0
    Microsoft improves security in version 6 of Microsoft Corp.'s Internet Information Server (IIS) in an attempt to deepen its penetration into the Web-server market, which has been dominated by Apache.

Dig Deeper on Web Development

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.