Red Hat Training

A Red Hat training course is available for Red Hat Directory Server

F.2. Configuring Admin Express

Admin Express can be edited for the page appearance, but most functionality is controlled through the web server or the Administration Server configuration and should be edited through those servers, not by editing the configuration files directly.

F.2.1. Admin Express File Locations

The directories for all of the Admin Express configuration files are listed in Table F.1, “Admin Express File Directories”; the specific files are described in each section describing the different Admin Express page configurations.

Table F.1. Admin Express File Directories

Directory Description
/etc/dirsrv/admin-serv/ Contains the local.conf, httpd.conf, and other configuration files which define the Administration Server and configure the web server.
/usr/share/dirsrv/html/ Contains the HTML files and graphics used for the Admin Express appearance.

F.2.2. Admin Express Configuration Files

The behavior for Admin Express is mostly set through the web server configuration and should not be edited. The other Admin Express configuration is set through directives which insert data or form fields.
There is not cascading style sheet (CSS) file to centralize the formatting for pages in Admin Express. All formatting is done inline with the tags or through <style> tags in the page head. For information on editing inline tags, see

F.2.2.1. Files for the Administration Server Welcome Page

The configuration files for the introductory page for Admin Express is located in the /etc/dirsrv/admin-serv directory. One file sets the formatting, copyright text, and some web application text, admserv.html.
Intro Page Elements

Figure F.4. Intro Page Elements

All of the formatting for the page is set inline. The text files are inserted using the INCLUDEIFEXISTS directive.
  <tr valign="TOP">
    <td> </td>
    <td bgcolor="#9999cc" colspan="4"> <font color="white" size="+1"><font face="Verdana, sans-serif">Services
      for Administrators</font></font></td>
    <td> </td>
  <tr valign="TOP">
    <td> </td>
    <td colspan="4">
      <table border="0" cellspacing="0" cellpadding="0">
        <tr valign="TOP">
          <td><img src="/icons/spacer.gif" width="6" height="6"></td>
<!-- INCLUDEIFEXISTS admserv_dsgw.html -->
The text files themselves have inline formatting for the inserted table rows.

F.2.2.2. Files for the Replication Status Appearance

There are two pages for monitoring the replication status. The first is for the configuration page, which requires two files:
  • The body of the page, /usr/share/dirsrv/html/monreplication.html
  • The heading of the page, /usr/share/dirsrv/html/htmladmin.html
Monitoring Replication Setup Page Elements

Figure F.5. Monitoring Replication Setup Page Elements

The Replication Status page uses two script-related configuration files:
  • The body of the page, which is configured in the replication monitoring script, /usr/bin/
  • Optionally, the configuration file for the replication monitoring, which can configure the time lag colors with the [colors] section
  • The heading of the page, /usr/share/dirsrv/html/htmladmin.html
Monitoring Replication View Page Elements

Figure F.6. Monitoring Replication View Page Elements

The text for the table headings, labels, and page sections are set in the Perl script. For example:
#Print the header of consumer
   print "\n<tr class=bgColor16>\n";
   print "<th nowrap>Receiver</th>\n";
   print "<th nowrap>Time Lag</th>\n";
   print "<th nowrap>Max CSN</th>\n";
   print "</tr>\n";
The styles for the Replication Status page are printed in the Perl script in the <style> tag in the HTML header. Many of the classes are the same as those in the style.css for the other web applications. These can be edited in the Perl script or by uncommenting the stylesheet reference and supplying a CSS file. For example:
 # print the HTML header

   print "Content-type: text/html\n\n";
   print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\"><html>\n";
   print "<head><title>Replication Status</title>\n";
   # print "<link type=text/css rel=stylesheet href=\"master-style.css\">\n";
   print "<style text/css>\n";
   print "Body, p, table, td, ul, li {color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px;}\n";
   print "A {color:blue; text-decoration: none;}\n";
   print "BODY {font-family: Arial, Helvetica, sans-serif}\n";
   print "P {font-family: Arial, Helvetica, sans-serif}\n";
   print "TH {font-weight: bold; font-family: Arial, Helvetica, sans-serif}\n";
   print "TD {font-family: Arial, Helvetica, sans-serif}\n";
   print ".bgColor1  {background-color: #003366;}\n";
   print ".bgColor4  {background-color: #cccccc;}\n";
   print ".bgColor5  {background-color: #999999;}\n";
   print ".bgColor9  {background-color: #336699;}\n";
   print ".bgColor13 {background-color: #ffffff;}\n";
   print ".bgColor16 {background-color: #6699cc;}\n";
   print ".text8  {color: #0099cc; font-size: 11px; font-weight: bold;}\n";
   print ".text28 {color: #ffcc33; font-size: 12px; font-weight: bold;}\n";
   print ".areatitle {font-weight: bold; color: #ffffff; font-family: Arial, Helvetica, sans-serif}\n";
   print ".page-title {font-weight: bold; font-size: larger; font-family: Arial, Helvetica, sans-serif}\n";
   print ".page-subtitle {font-weight: bold; font-family: Arial, Helvetica, sans-serif}\n";

   print "</style></head>\n<body class=bgColor4>\n";

F.2.2.3. Files for the Server Information Page

There are two files formatting the server information page:
  • The body of the page, /usr/share/dirsrv/html/viewdata.html
  • The heading of the page, /usr/share/dirsrv/html/htmladmin.html
Server Information Page Elements

Figure F.7. Server Information Page Elements

The viewdata.html file is very simple, using only the two directives to insert the server data, plus other directives to insert other information. For the Administration Server, the SHOW_DATA directive takes the information from the /etc/dirsrv/admin-serv/local.conf file. For the Directory Server, it takes the data from the /etc/dirsrv/slapd-instance/dse.ldif file. The ID_TITLE is the name of the server instance.
<body text="#000000" bgcolor="#FFFFFF" link="#666699" vlink="#666699" alink="#333366">

<!-- ID_TITLE -->
<!-- SHOW_DATA -->
<font face="PrimaSans BT, Verdana, sans-serif"><font size=-1>Additional Information:</font></font>
<!-- SHOW_URL -->



F.2.2.4. Files for the Server Logs Page

There are two files formatting the server logs page:
  • The body of the page, /usr/share/dirsrv/html/viewlog.html
  • The heading of the page, /usr/share/dirsrv/html/htmladmin.html
Log View Page Elements

Figure F.8. Log View Page Elements

The page information is set through the inserted directives. The server instance name is set in the ID_TITLE directive. The log is displayed through the ACCESS_LOG directives. The form at the top is formatted with directive pairs, one which sets the descriptive text and the other inserting the field type. For example, this sets the log type menu:
<form method=GET action=ViewLog>
<font face="PrimaSans BT, Verdana, sans-serif"><font size=-1>
<!-- BEGINELEM -->
<!-- ELEM txt="Log to view:            " -->
<!-- LOG_TO_VIEW -->
<!-- SUBMIT -->

F.2.3. Admin Express Directives

The Admin Express directives are HTML comments that are interpreted by the CGI scripts; these directives are used to set form fields and to pull data from the server configuration and log files.

Table F.2. Admin Express Directives

Directive Description Example
ACCESS_LOG Inserts the server log file. <!-- ACCESS_LOG -->
BEGINELEM Marks the opening of form input elements. This is always paired with ENDELEM. <!-- BEGINELEM -->
ELEM Inserts a text element. This has one argument, txt=, which defines the text to use. <!-- ELEM txt="Field name here: " -->
ELEMADD Inserts a text element. This has one argument, txt=, which defines the text to use. <!-- ELEMADD txt="Field name here: " -->
ENDELEM Marks the ending of form input elements. This is always paired with BEGINELEM. <!-- ENDELEM -->
HELP_BUTTON Inserts a button to open context-specific help. <!-- HELP_BUTTON -->
HELPLINK Inserts a link to the general Admin Express help file. <!-- HELPLINK -->
ID_TITLE Inserts the name of the server instance, such as admin-serv or example (if the Directory Server instance name is slapd-example) <!-- ID_TITLE -->
INCLUDEIFEXISTS Inserts the contents of the HTML file. The inserted file should include both the text and any HTML markup. <!-- INCLUDEIFEXISTS "file.html" -->
LOG_TO_VIEW Inserts a drop-down menu with the types of logs available to view. <!-- LOG_TO_VIEW -->
NUM_TO_VIEW Inserts a form field to set the number of lines to return. <!-- NUM_TO_VIEW -->
REFRESHINTERVAL Inserts a form field to set the refresh interval (in seconds) for replication monitoring. <!-- REFRESHINTERVAL -->
SHOW_DATA Inserts the server data from the configuration file, including the port number, installation date, and build number. <!-- SHOW_DATA -->
STRING_TO_VIEW Inserts a form field to use to set the search string for the logs. <!-- STRING_TO_VIEW -->
SUBMIT Inserts a three-button set: to save or submit the form; to reset the form; and to open a help topic. <!-- SUBMIT -->