Apache 2.0

Reuven discusses the significance of the 2.0 release for web developers, administrators and the Open Source community.
Configuring and Installing Apache

Retrieve the latest source code from httpd.apache.org/dist/httpd; the latest version as of this writing is 2.0.35. Unpack the source code in a temporary directory:

cd /tmp
tar zxvf httpd-2.0.35.tar.gz

You may now run the configure program with one or more arguments. These arguments fall into roughly four categories: 1) Into which directories should Apache be installed? 2) Which MPM do you want to use? 3) Under which user ID should CGI programs execute? 4) Which modules do you want to install? And of those, which should be installed dynamically (using shared libraries) rather than statically?

You can get a full list of configuration options by typing ./configure --help. This is particularly true if you want to include a module that isn't included by default. The biggest change in configuration is that modules now have their own options to activate them. For the simplest possible configuration that uses the “worker” MPM, type:

./configure --with-mpm=worker

Following this, run make, followed by make install. (There is no make test for Apache as of the time of this writing.) By default, Apache 2.0 is installed into /usr/local/apache2. You can start it using the same program as Apache 1.x, apachectl, which is normally in /usr/local/apache2/bin/:

/usr/local/apache2/bin/apachectl start
The server will soon start up. HTML documents will normally be kept in /usr/local/apache2/htdocs, so you should already be able to put HTML documents there and view them.

Apache's runtime configuration remains dependent on a text file, normally called httpd.conf. If you are familiar with Apache 1.x, then you will be happy to know that almost all of the existing directives will continue to work. The main directives that you will have to learn are those that pertain to threading, assuming that you use the worker or perchild MPMs.

Should I Switch?

When the Apache Software Foundation announced Apache 2.0, the announcement explicitly said that the new version is the most stable and recommended version for production use. And for the most part, I believe them; www.apache.org receives many more requests per day than my server, and they have been running Apache 2.0 beta versions for over a year. Thus, it's safe to say that Apache 2.0 is stable enough for most sites to use.

The main reason to avoid switching to Apache 2.0 at this point is if you need mod_perl or PHP; they are currently still in testing but will probably be available by the time you read this.

As I mentioned above, however, it's hard to get threading right, and this is particularly true in Perl, which has experimented with a number of threading models in the last few years. If you have compiled Perl with ithreads, then you can use it to create a mod_perl for Apache 2.0 that uses the worker or perchild MPMs. But just how stable this configuration will be remains to be seen; it may well be that mod_perl users will choose to stick with the prefork MPM for now, until the dust settles a bit.


Apache 2.0 comes with more of everything that a web developer would want—more modules, more flexibility and greater speed. If you haven't yet tried Apache 2.0, I encourage you to download it and test it with your site's configuration to verify that it will be a good choice.


email: reuven@lerner.co.il

Reuven M. Lerner is a consultant specializing in web/database applications and open-source software. His book, Core Perl, was published in January 2002 by Prentice Hall.


White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState