6.1 About Multiple Server Administration

The Multiple Server Administration interface of Apache Manager stores Apache configurations in eDirectory so that a change to one Web server's configuration can be inherited by all other servers defined in a Server Group. This makes server management and configuration faster, easier, and more accurate.

To do this, Apache Manager uses two key components: eDirectory and a configuration daemon. A basic understanding of these two components can help you to better understand and use the Multiple Server Administration interface.

6.1.1 eDirectory

eDirectory is used by Apache Manager in two ways: first, as a database where Apache configuration directives are stored, and second, as an environment that allows Apache configuration objects to be shared and inherited.

Apache Manager divides the Apache configuration file ( httpd.conf) into a hierarchy of configuration objects and then stores them in eDirectory. By storing directives in a hierarchy of objects, they can be applied to a single server, a group of servers, or to an entire Web farm.

Some blocks are unique from others, such as virtual host or Apache module blocks, because they utilize directives unique to them. Therefore, they appear as unique and separate objects.

The httpd.conf file is divided into a set of five object classes: server group, server, virtual host, module, and block. These object classes are defined in the following table.

Table 6-1 eDirectory Object Classes and Definitions

Object Class

Definition

Server Group

Represents a set of Apache configuration directives common to all server objects contained in a group. It can contain any number of server groups, servers, modules, and blocks.

Server

Represents a single Apache server. It contains standard attributes such as Server Name. It is used to define any single server and serves as an anchor point for each server's configuration. It can contain any number of virtual hosts, modules, and blocks.

Virtual Host

Represents a virtual host within an instance of an Apache server. It contains the necessary attributes to create a VirtualHost block in the Apache configuration file. It must be contained within a server object and can itself contain any number of block objects.

Module

Represents an Apache module. It 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 redefining the module for each server. It can contain any number of block objects.

Block

Literally, blocks are specific directives used to enclose a set of configurations. A block object represents a Directory, Location, or File block, or any of their derivatives. A block object defines the Directory|Location|File tags within a configuration file. It 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 redefining the block for each instance. A block cannot contain any other objects.

By defining a server object within a directory 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.

Each object class contains a set of attributes that store the data that is required to produce a portion of the configuration in a complete httpd.conf file. Additionally, each object class can store any number of directives that you might want defined at that level of the object hierarchy.

6.1.2 Configuration Daemon

The configuration daemon is a small Java application that runs along with the Apache server software. It serves as a conduit between each Web server's actual configuration file and the directory service that holds Apache's configuration objects.

The configuration daemon extracts Apache directives from directory server objects, assembles them, and then creates a new httpd.conf configuration file. After the configuration file is created, the daemon restarts Apache so that new changes can be read by the Apache Web server.

HINT:When Apache Manager is started, so is the configuration daemon. However, if you need to start the daemon manually, type ap2webman at the NetWare® system console. Also, using this command automatically imports your current Apache Web server configurations, including any virtual hosts. For more information, see Section 6.5, Adding or Removing Servers to or from a Server Group.

The first time the daemon is run for a specific instance of the Apache Web server, it creates a server object in the object hierarchy and ensures that the configuration stored in the directory matches the current configuration file. The daemon then continues to monitor the directory for any changes made to a particular server. If you manually change the configuration file stored on the server's hard drive, the daemon detects the change and imports it into the server configuration that was previously stored in the directory.

How the configuration daemon processes Apache configurations with the directory.

This process ensures that the configuration file used to configure a specific instance of Apache remains synchronized with the shared configuration objects in the directory. If a change is detected, it updates the configuration file and notifies Apache that it is time to reload the configuration file. If a configuration has not yet been created in the directory, the daemon imports the current configuration file.

Configuration Daemon Properties File

The startup.properties file stored in volume:\apache2\conf\daemon is used to configure the daemon. By default, it contains the following configurations:

# NWConfVersion = 2
InitialContextFactory = com.sun.jndi.ldap.LdapCtxFactory
ProviderURL = airport.newyork.digitalairlines.com
#Port = 389
Port = 636
UseSSL = yes
SecurityAuthentication = simple
UserID = cn=admin,o=cents
#Password = <Your-Password>
ServerDN = cn=airport,cn=NetWare Group,cn=Apache Group,o=cents
ServerName = airport.newyork.digitalairlines.com
ConfigFile = sys:/apache2/conf/httpd.conf
BackupDir = sys:/apache2/conf/backup/
StartApacheCmd = sys:/system/ap2webup.ncf
RestartApacheCmd = sys:/system/ap2webrs.ncf
StopApacheCmd = sys:/system/ap2webdn.ncf
RestartDelay = 10000
StartupErrorLog=sys:/apache2/logs/startup.err
StorageMode = FILE

Depending on changes you might make to your server, you might need to modify some of the paths. Most critically, you might have to make changes to UserID and ServerDN, making sure that if you move your administrator user object, you must specify the new location in this file.