Search ServerWatch
Search ServerWatch
Search ServerWatch




Continuous Real-time Data Protection and Disaster Recovery
Whitepaper: Learn how building a solid foundation from a flexible solution can not only integrate all elements within your datacenter - computing, storage, power and management - but prepares your data to survive and recovery... »
Virtualization - It's Not Just for Enterprises Anymore
Whitepaper: Read how virtualization can help companies of all sizes vastly increase server utilization levels, delay or avoid hardware purchases, and expand infrastructure capacity without increasing physical space requirements. »
Rightsizing Blades for the Mid-market
Whitepaper: Examine the requirements for servers, storage, and blade systems in the mid-market and how to apply blades your data center in a cost effective manner. »
VMware Infrastructure 3, Planning
Whitepaper: Read about planning, deployment, and operation of an Adaptive Infrastructure based on VMware Infrastructure and HP servers, storage, and management technologies. »
Disaster recovery made easy with HP BladeSystem and VMware virtualization
Webcast: Learn how you can leverage HP BladeSystem and VMware ESX Server to build a cost effective DR solution that can grow with your business. »

Serve your customers, not your servers, with VERIO FreeBSD VPS. Click here for your full-access, test-drive.

ServerWatch > Server Directory > Web Servers > Apache

Web Servers - Apache

Apache 2.2.0: Should I Stay or Should I Go?

Apache 2.2.0 is major release of the Apache httpd server and includes a number of critical changes. Many of these changes are improvements of existing modules, but there are also a number of new modules and improvements in some aspects of the operational functionality. This article will cover some of the specific elements that have changed (with examples and alternative configurations) as well as discuss when to upgrade to the new version and when to wait for a future revision.

New Features and Changes

The new 2.2.0 version is not just an updated release of an existing tree; much of the code is new or has been heavily improved and extended to provide additional functionality, or to extend or simplify existing features.

Configuration Changes

The configuration file in Apache has always had a love-hate relationship with its users. Some like the monolithic, all-configuration-in-the-same-file approach. Others prefer to split their file up and use the import system to insert specific configuration information. Although it doesn't affect the configuration, using multiple files is easier to understand and can be more convenient, as it enables you to put the configuration for individual virtual hosts into individual files.

The default configuration file with the Apache distribution was the monolithic style and often contained many directives that some users would either not use or understand, and some they simply wouldn't ever modify. Some Linux distributions (e.g., Gentoo), already divide the configuration file by default. Now it is a standard feature of the standard distribution.

The main httpd.conf file remains. In addition, the configuration file optionally includes standard configuration files for the following elements:

  • Server-pool management (MPM configuration)
  • Multilanguage error messages
  • Fancy directory listings
  • Language settings
  • User home directories
  • Real-time info on requests/configuration (/server-info and /server-status)
  • Virtual hosts configuration
  • Access to the Apache manual
  • Distributed authoring and versioning (WebDAV)
  • Miscellaneous default settings
  • SSL configuration

File splitting is not compulsory, and you should be able to use existing single- or multi-file configuration without problems. However, going forward, consider splitting up the file along the guidelines used in the default configuration.

Authorization/Authentication Modules

Although authorization and authentication itself hasn't changed, the modules that provide them have been rebuilt, and in some cases renamed, to make it easier to load the precise components desired. A new module has also been added that provides authorization through LDAP (mod_authnz_ldap).

Standard authorization modules have been changed to provide some consistency between the module names and the type of authorization they provide. For example, the original mod_auth module has been split into mod_auth_basic (now specifically for HTTP authentication) and mod_authn_file (which provides the back-end interface to authentication through files). The module prefix now identifies the modules role in the authentication/authorization process. Hence:

  • mod_auth_* indicates modules that implement an HTTP authentication mechanism (e.g., mod_auth_basic and mod_auth_digest etc).
  • mod_authn_* indicates modules the implement back-end authentication (e.g., mod_authn_file and mod_authn_dbm).
  • mod_authz_* indicates modules that implement authorization (e.g., mod_authz_dbm and mod_authz_host).
  • mod_authnz_* indicates modules that implement both authentication and authorization (including the new mod_authnz_ldap module).

The result is a much more intuitive suite of modules that can finely control the authentication and authorization support included in your configuration. It should also make it easier for custom authentication and authorization modules to be developed since you can more easily integrate with other existing components.

Proxying/Caching

A new balancing module, mod_proxy_balancer, has been added that provides load balancing services for the main mod_proxy proxy module. The load balancer enables requests to be shared among workers via two methods, request counting and weighted traffic counting. Request counting just counts the number of requests and distributes requests across workers until they have each served an equal number of requests.

Weighted traffic counting works on the same bases as simple request counting, but you can weight individual workers so certain workers execute more requests than others. Configuration is by bytes, rather than simple requests, so you could, for example, configure one worker to process twice as many bytes as other workers, even though this may be from fewer actual requests.

The new proxy balancer also includes an additional status display, similar to the /server-status and /server-info systems for monitor server status and configuration.

The caching modules (mod_cache, mod_disk_cache, and mod_mem_cache) have never been considered complete, although many organizations use these modules without any issues. The modules are, however, now considered to be production quality. There is also a new program, htcacheclean, that cleans up the file database of cached documents. It can be run ad-hoc or as a daemon and can also provide statistics on cache directory sizes.

Filtering

The mod_filter module has been extended to allow filters to be executed based on conditional criteria. This changes the old model under which documents were merely filtered unconditionally according to the configuration of the AddOutputFilter directive or the minor flexibility offered by AddOutputFilterByType.

Now, instead of adding specific filters to specific file types we create a proper filter chain — output is processed by each filter in the chain. This requires a declaration of the available filter types, and if necessary, the source requirements (file type) and the filters to apply.

To expand on the example given in the standard documentation, this changes the old style filter method for server side includes (SSI) from:

AddOutputFilter INCLUDES .shtml 

To:

FilterDeclare SSI
FilterProvider SSI INCLUDES resp=Content-Type $text/html
FilterChain SSI

The filter chain declaration enables us to add filters at specific points in the chain — and even specify that a specific filter is removed based on a specific condition. For example, you may want to add SSI to all output, unless the output is a CGI. You could achieve this by adding the SSI filter to the chain but removing it when the request is for a CGI script.

Database Support

Database support in Apache modules used to require additional coding to build a wrapper around the code to gain access to the database. For example, if you wanted to add SQL-based authentication through MySQL or PostgreSQL, then the module had to provide its own interface to the SQL database. Programming and performance issues made this a less than ideal solution.

Apache now provides the mod_dbd module, which provides database connections using a standard interface. The module uses the apr_dbd interface, which also means database connections can work within a threaded environment by providing a pool of available connections. This should help increase the flexibility of the database environment and improve the performance of modules requiring databaseconnectivity.

Note that this is not a solution for database access in dynamic Web sites, but in the future it may be made available through module-based interfaces, such as mod_perl and mod_php, for providing connectivity.

Module Development Changes

There are some back-end changes to the interface for developing certain features when building custom modules for use with Apache. The release notes provide more detailed information, but basic changes include:

  • Connection error logging make it easier to log connection-related error messages.
  • Test configuration hooks provide test results when performing a configuration test.
  • Stacksize can be modified for thread-based MPMs.
  • Protocol handling is performed on output filters. In line with the changes to the filter system, filters can now delegate responsibility for setting the correct output type to mod_filter.
  • A monitor hook enables modules to request the regular or schedule execution of jobs automatically.
  • The regular expression interface has changed and the Perl Compatible Regular Expression (PCRE) library has been updated to v5.0. Both the header files supporting the regexp functions and the functions have changed.
  • New DBD framework makes it easier to interface to SQL databases, but changes should be made to modules that use their own custom system.

Any modules that use these features should be updated accordingly.

>> Program Changes

Go to page 1  2  


Discuss this article
Tools:
Add serverwatch.com to your favorites
Add serverwatch.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x

Servers Archives




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES