Apache Manager Table of Contents
Upcoming SlideShare
Loading in...5
×
 

Apache Manager Table of Contents

on

  • 417 views

 

Statistics

Views

Total Views
417
Views on SlideShare
417
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Apache Manager Table of Contents Apache Manager Table of Contents Document Transcript

  • White Paper Apache Manager A Directory-Based Approach to Managing Apache Web Servers Dave Mitchell and Brad Nicholes www.novell.com
  • Apache Manager Table of Contents Apache Manager Table of Contents 2 Abstract 3 Introduction 4 Manually Configuring an Apache Server 4 • Figure-1, Apache’s HTTPD.CONF file Advantages of Using the Apache Manager 5 Platform Independence 5 Single-Web based Location 5 Common Directive Consolidation 5 How the Apache Manager Functions 6 The Directory 6 Server Group 7 Server 7 Virtual Host 7 Module 7 Block 7 Configuration Daemon 7 • Figure-2, Configuration Daemon Web-Interface 8 Object Frame 8 • Figure-3, Objects Frame Directive Frame 9 • Figure-4, Directives Frame Conclusion 9 Novell White Paper Page 2 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Abstract With the release of NetWare 6.5, Novell, Inc. provides a powerful new Apache management tool called the Apache Manager. It is a web-based utility that leverages Novell eDirectory to manage one or many Apache web servers running on NetWare or any other combination of operating systems to include Linux, Solaris, IBM-AIX or Windows. This paper explains the advantages associated with storing Apache’s configuration files in a hierarchy of directory objects. This concept provides the underpinnings for a superior methodology for managing a web farm environment. There are a number of advantages to this approach. They include platform independence, a central point of management for all instances of Apache, and consolidation of common directives. Apache Manager consists of two separate pieces they include the Apache Manager web utility and the configuration daemon. These components are built on top of industry standards that are open and universally accepted. This allows them to fully interoperate insulated from the underlying demands of the operating system which in turn satisfies the needs of a cross platform world. One of the truly powerful aspects of Apache Manager is its integration with Novell’s highly scalable and distributed directory service. The directory not only acts as the database where the configuration directives are stored, it also provides an environment that allows configuration objects to be shared and inherited. The basic concept is that when identical directives exist for multiple Apache servers, these directives can be stored in a single directory object rather than duplicated in multiple configuration files. Apache Manager provides the web administrator with a powerful time saving tool that increases productivity as each directory object holds a common set of directives that may be inherited by lower level objects in the eDirectory tree. The “Apache Group” is the highest object in the tree. It contains a set of directives that are common across all instances of the Apache web server regardless of the platform it is running on. The end result is that Apache Manager is not only capable of managing a large number of Apache web servers, it will also manage different versions of Apache running on different platforms. The specific requirement is that the platform provides a supported JVM and the ability to connect to a directory service through the LDAP protocol. Novell White Paper Page 3 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Introduction The origins of the web began with an information project known as CERN, today this is where the world’s largest particle physics laboratory still operates. This project later developed into what is known as the World Wide Web Consortium (W3C). As web technologies evolved there emerged specific software, protocol sets and conventions to govern them. At the root of this digital ancestral tree are browsers and http servers. Today one of the dominant players in this Internet ecology is the Apache web server, the most widely deployed web server on the Net. According to the most recent surveys from Netcraft, Apache web servers represent 62.5 percent of the total web server deployments. Until very recently, managing an Apache web server was a fairly primitive task, accomplished mainly through the editing of a text file known as the httpd.conf file. It is this file that contains the key configuration directives for an Apache web server. The Apache Manager helps to solve many of the problems that are associated with the current Apache administration methods and procedures. One of the most important is the ability to manage multiple Apache web servers as part of a centralized management system. Prior to this managing multiple instances of Apache was tedious and time consuming. This paper will provide an overview of the Apache Manager and discuss the advantages of integrating the Apache configuration file with a highly scalable and distributed directory service. This paper will demonstrate that storing the Apache configuration as a hierarchy of directory objects can offer superior configuration management in a web farm environment. Manually Configuring an Apache Server The most commonly used method of managing the Apache web server is to manually edit the configuration file using a text editor. The Apache configuration file, called the httpd.conf file, is stored in the conf subdirectory under the Apache root directory. This simply constructed text file holds all of the directives necessary to successfully configuring a web server and any of its additional modules that may need to be loaded. This simple list of directives and their associated values define how the Apache web server will handle requests. Because of its simplistic nature, most administrators responsible for managing a single instance of Apache choose to manage the web server manually rather than use a management tool that provides additional functionality. An administrator of a typical Apache server manages the configuration by manually changing the contents of the configuration file. For a single instance of the web server or even a small number of servers, this method of administering the server is tolerable. But it becomes much more tedious in a web farm environment. If a directive needs to be changed on all servers, or a new module needs to be [Figure-1, Apache’s HTTPD.CONF file] loaded, each server’s httpd.conf file will need to be opened, changed, and saved. Novell White Paper Page 4 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Apache must then be restarted so that the changes can be applied. Some alternatives to manual administration have been proposed and some have been implemented. But for the most part, these alternatives are platform specific and can only be run on a machine that has direct file access to the httpd.conf file. Some of these solutions provide a simpler user interface and perform some simple tasks during configuration file management, but they only solve the problem for a single localized Apache server. The real problem of easily administering an Apache web farm still exists. The answer to this problem is couched within in a directory-based approach to configuration as implemented by Apache Manager. Advantages of Using the Apache Manager Apache Manager provides a simple solution to the problem of managing an Apache web farm. Some of the advantages provided by Apache Manager include platform independence, single web-based location for managing all instances of Apache, and consolidation of common directives across Apache instances. Apache Manager eliminates the need for an administrator to have to edit and maintain a large number of configuration files as many of the directives are common across each Apache web server instance Platform Independence Apache Manager was designed and built specifically with platform independence in mind. The basic idea is that since Apache is a cross-platform web server, managing Apache should also be cross-platform activity. With this in mind, the runtime environment as well as the implementation of the administration tool had to be cross platform. There are few technologies that could be considered completely cross platform. The most obvious was to build a web based management utility that implemented java technology in tandem with LDAP as the protocol for accessing the directory. Apache Manager is composed of two separate pieces: the Apache Manager web utility and the configuration daemon that runs along side the Apache web server. Both of these pieces are built using Java and LDAP technologies allowing the solution to run on all major operating systems. The Apache Manager Configuration Daemon is built as a Java utility that utilizes the Java Naming and Directory Interface (JNDI) classes along with an LDAP provider to access an LDAP-compliant directory. The web pages are implemented as Java Server Pages (JSP) and take advantage of the same JNDI interfaces for reading and writing data in the directory. The only platform requirements associated with the Apache Manager instance is a web server, a JSP/servlet engine, an LDAP-compliant directory and a Java Virtual Machine. All of these exist on all of the major platforms. The Apache web server and the configuration daemon is the only piece that must be running on any platform when managed through the Apache Manager instance. The Apache web management interface need only run on one server in the network. Single-Web based Location Apache Manager has the ability to manage the configuration for any number of Apache servers through a single interface. Administrators can log in to a single instance of Apache Manager to view and configure every instance of Apache running on their network. Once the configuration has been changed in the directory, the configuration daemon handles saving the new configuration to the httpd.conf file as well as restarting Apache web server. This solves the problem of having to physically access the configuration file of each individual Apache server just so the administrator can manually edit the configuration files and then restart each web server. Apache Manager allows the administrator to do it all from one single location while leveraging the web based interface. Common Directive Consolidation Since the Apache Web Server is a cross platform application, configuring Apache on different platforms is basically the same. For the most part, a configuration file used to configuration Apache on one platform can easily be used to configure Apache on another platform. This means that most of the configuration directives themselves are completely common regardless of the platform that the web server is running on. Novell White Paper Page 5 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Apache Manager allows directives that are common across multiple Apache servers to be stored in a common location and while being inherited by each Apache server. For example, assume that the directive on every Apache server for “HostNameLookups” is set to “On”. With Apache Manager this directive can be stored in a server group object that is inherited by every Apache server. If the administrator wanted to change the value of “HostNameLookups” to “Off”, the change could be made in the server group object and all Apache servers would automatically inherit the configuration change. This saves the administrator from the tedious task of manually changing each server’s configuration file. It also provides the administrator with a much easier way of adding new Apache servers to the web server farm. Adding a single server object to the directory with just a few specific directives is all that is needed. The remainder of the configuration file can be constructed by inheriting the common set of directives that were already established in the directory. This eliminates having to duplicate directives that have already been defined in another configuration file. How the Apache Manager Functions Apache Manager has three basic parts, the directory service, the configuration daemon, and the web-interface. The directory service not only acts as the database where the configuration directives are stored, it also provides an environment that allows configuration objects to be shared and inherited. The configuration daemon is a small java application that runs in parallel with the actual Apache server software. It extracts the configuration directive out of the directory server objects, assembles them creating the httpd.conf file. In addition to creating the configuration file, it is also able to restart the Apache web server when specific flags have been set in an Apache server object within the directory. The web-interface presents the Apache configuration in an easy to manage format enabling changes to be made quickly to one or many Apache servers through a web browser. Apache Manager uses a directory-based, hierarchical object model to simplify the management of and share configuration directive within a web farm. The basic idea is that when an identical directive exists for multiple Apache servers, that directive can be stored in a single directory object rather than duplicated in multiple configuration files. This allows the directive to be shared among multiple Apache server configurations and provide a way for the administrator to modify the directive once and apply the modification across multiple servers. The implementation of this idea is more complex, but Apache Manager masks the complexity and presents the administrator with a simple solution to managing the web farm. The Directory Apache Manager divides the Apache configuration file into a hierarchy of configuration objects and then stores them in a directory service. By storing directives in a hierarchy of objects, those directives can be applied to a single server, a group of servers, or to an entire web farm. An HTTPD.CONF file can be broken up into a set of parts that can be represented by five different object classes. These object classes are: Server Group Server Virtual Host Module Block By defining a server object within the directory service and combining the object with one or more virtual host, module and block objects, an entire configuration for an Apache web server can be stored, manipulated, and shared through the directory service. Each object class contains a set of attributes that can store the data required to produce a portion of the configuration in a complete httpd.conf file. Additionally, each object class may store any number of specific directives that the administrator wants defined at that location of the object hierarchy. Novell White Paper Page 6 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • The definitions of the five object classes are as follows: Server Group The server group is a representation of a set of Apache configuration directives common to all server objects contained in the group. A server group may contain any number of server groups, servers, modules, and blocks. Server The server object is a representation of a single Apache server. It contains standard attributes such as Server Name. It is used as a definition of any single server and is an anchor point for its configuration. It may contain any number of virtual hosts, modules, and blocks. Virtual Host The virtual host object is a representation of a virtual host within an instance of an Apache server. The object contains the necessary attributes to create a <VirtualHost . . .> block in the Apache configuration file. A virtual host object must be contained by a server object and can contain any number of block objects. Module The module object is a representation of an Apache module. The module object defines the “LoadModule” directive and the <IfModule …> tag within a configuration file. A module can be defined at any level of the hierarchy so that it can be inherited by one or more server configurations. This allows the module to be loaded and configured in exactly the same way by multiple web servers without having to redefine the module for each server. It can contain any number of block objects. Block The block object is a representation of a Directory, Location or File block or any of their derivatives. It defines the <Directory|Location|File …> tag within a configuration file. A block can be defined at any level of the hierarchy so that one or more server configurations can inherit it. This allows the block definition to be applied in exactly the same way by multiple web servers without having to redefine the block for each instance. A block cannot contain any other objects. Configuration Daemon 1) The configuration Daemon is started. 2) The new configuration data is extracted from the directory. 3) Configuration data is written to a configuration file on the local file system. 4) The Apache web server is started or restarted. 5) Apache then reads the configuration file. 6) The configuration Daemon waits for changes in the directory and restarts from step number 2 when necessary. [Figure-2, Configuration Daemon] As explained in the object hierarchy section, the configuration for any given Apache web server is stored in a series of objects in the directory. The information in the directory is extracted by a configuration builder service known as the Apache Manager Configuration Daemon. The daemon runs in parallel with each instance of Apache and knows how to extract the objects from the directory and order them to construct the httpd.conf file. Novell White Paper Page 7 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Therefore, each Apache server on the network should also have a Configuration Daemon running with it. The configuration daemon is the conduit between the physical configuration file stored for each Apache web server instance and the directory service that holds the configuration objects. After the daemon is started it monitors the directory for any changes made to a particular server. If a change is detected, it updates the configuration file and notifies the Apache Server that it is time to reload its configuration file. Additionally, if an Apache server’s configuration has not been stored in the directory, the daemon has the ability to import the current configuration file into the directory. For example, the first time the daemon runs in conjunction with a specific instance of the Apache web server, it will create a server object in object hierarchy to ensure that the configuration stored in the directory matches the current configuration file of the Apache server. In addition to importing a new configuration, it also has the ability to detect when a physical configuration file has been changed. If an administrator makes a change directly to the Apache configuration file stored on disk, the daemon can detect the change and import it into the server configuration previously stored in the directory. One purpose of the configuration daemon is to make sure that the configuration file used to configure a specific instance of Apache remains synchronized with the shared configuration objects in the directory. Web-Interface The Apache Manager web-interface is a browser-based administration utility that allows administrators to view and configure the entire web farm from a single location on the Internet. The web interface simply displays the current configuration for each Apache server as it is stored in the directory and allows the administrator to manipulate the configuration objects. Object Frame The interface is simple (see figure to the left). The “Objects” frame gives a view of the Apache configuration objects that are currently stored in the directory and gives the user the ability to navigate the hierarchy. The object hierarchy begins with a server group, generally called “Apache Group.” The top group contains other groups that define an organization that will make sense for the administrator. Apache groups may be organized according to platform, deployment, or some other configuration model. [Figure-3, Objects Frame] Each object in the directory holds a common set of directives that may be inherited by lower level objects in the tree. The “Apache Group” object or the highest object in the tree contains the set of directives that are common across all instances of the Apache web server regardless of the platform that it is running on. Objects that appear at lower levels in the tree, define directives that are specific to particular configurations. The lower the object sits in the tree, the more specific or unique the directives are to a particular Apache web server configuration. The complete configuration for a particular web server is a combination of the directives contained by the server object along with the directives contained by each object within its hierarchical path. Novell White Paper Page 8 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Directive Frame The “Directives” frame is the central view which displays the configuration contents held by the currently selected object. This frame gives the administrator the ability to manage the directives that are contained in the object, add child-objects or alter the attribute values of the object itself. Additionally, for server objects, the “Directives” frame allows the administrator to view the server’s configuration file as it would be created by the configuration daemon. In the configuration file view, all directives are linked back to the object where they were defined. This makes it easy to navigate to an object that holds a specific directive without having to know where the directive came from. [Figure-4, Directives Frame] The Apache Manager interface also allows the administrator to restart each Apache web server that is administered through this interface. If the configuration file for a specific server has been changed manually, this will be communicated back to the directory by the configuration daemon and displayed in the web interface. It gives the administrator the option of importing the changes or rejecting them in order to maintain synchronization between the physical server and the directory. It displays the current status of each Apache server indicating whether the server is currently running or not. Whenever a change is made in the directory, a flag within the Apache server object can be set that directs the configuration daemon to rebuild the physical configuration file for a particular Apache server and restart it. Through the web interface, the administrator has a view of all of their servers within a web farm and the ability to manage those servers. Conclusion Apache Manager is a platform independent administration solution that allows an administrator to manage multiple Apache web server configurations from a single web interface. By taking advantage of the directory, it provides the necessary tools to consolidate common configuration directives into a hierarchy of objects, stored in a single location so that all Apache servers may be easily managed from the Internet. Apache Manager is an excellent solution for administrators that are responsible for managing multiple Apache web servers. Apache Manager is not only capable of managing a large number of Apache web servers; it will also manage different versions of Apache running on different platforms. The only real requirement is that the platform supports a JVM and the ability to connect to a directory service through the LDAP protocol. Apache Manager removes the complexity and overhead common to managing multiple Apache web servers. Novell White Paper Page 9 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com
  • Novell White Paper Page 10 of 10 pages Apache Manager Open Source Solutions for OneNet Services http://www.novell.com