Installing and Administering an AnswerBook2 Server

Configuring the Documentation Server

To view the current server configuration, select View Current Configuration from the Admin GUI. To change these settings, select Modify Server Configuration from the Admin GUI.

Viewing Documentation Server Configuration

The View Current Configuration page lists the settings shown in Table 3-1 and Table 3-2. These settings are stored in the server_config_path/dwhttpd.cfg file (which defaults to /usr/lib/ab2/dweb/data/config/dwhttpd.cfg).


Note -

If you are running a CGI-based server rather than the default NSAPI-based server, only some server configuration options are visible in the Admin GUI's interface. For more information, see "Configuration Issues when Running the Server as a CGI Process".


Table 3-1 User-Configurable Server Configuration Settings

Label 

Default Value and Description 

Server name 

Default: Local host name (for example: imaserver). This is the name clients use to access documents on this server. To improve response time, put in a fully qualified name (for example: imaserver.eng.sun.com). If you expect people outside your domain to access this document server, you must put in the fully qualified name.

Server port 

Default: 8888. This is the port number for communications. You can choose any unused port number, although the default is recommended.

Maximum threads 

Default: 32. This is the maximum number of concurrent AnswerBook1 searches the server will perform. If you have lots of AnswerBook1 collections and people search them frequently, you might want to increase this number. If you increase this number, however, it might slow your server's response time.

Maximum server requests 

Default: 1024. This tells the server to perform "housekeeping" activities and restart itself after the specified number of http requests.

Access file 

Default:/var/log/ab2/logs/access-8888.log. This is the complete path name to the access log that contains information about every access made to the local server.

Error file 

Default: /var/log/ab2/logs/error-8888.log. This is the complete path name to the error log that contains information about any errors that occurred.

Administration access control 

Default: On. This tells you whether you control who has access to administrative functions on this server. When you first install a document server, although administrative access control is turned on, no default username and password are defined. For information on setting up initial administration access, see "Setting Up Initial Administrative Access".


Note -

The document administrator should not manually change the settings shown in Table 3-2. The system configures these settings when you install the server software.


Table 3-2 Fixed Server Configuration Settings

Label 

Default Value and Description 

Server configuration path 

Default: /usr/lib/ab2/dweb/data/config

This is the path name to where the configuration files for this server are stored. 

Server user 

Default: daemon

This is the owner of the server process. Changing the value of this variable could create significant problems running the server or accessing collections on this server.  

Plug-in file 

Default: /usr/lib/ab2/dweb/data/config/nsapi.cfg

This is the complete path name to the file that defines all server plug-ins. 

Mime file 

Default: /usr/lib/ab2/dweb/data/config/mime.types

This is the complete path name to the file that defines all MIME information. 

Doc root 

Default: /usr/lib/ab2/data/docs

This is the path name to where the document files for this server are stored. 

Log directory 

Default: /var/log/ab2/logs

This is the path name to where the log files for this server are stored. 

AnswerBook1 Collection Database 

Default: /var/log/ab2/catalog/ab1_cardcatalog

This file identifies the AnswerBook1 collections installed on this server. 

AnswerBook2 Collection Database 

Default: /usr/lib/ab2/dweb/data/config/ab2_collections.template

This file identifies the AnswerBook2 collections installed on this server. 

You can also use the following command to view the current server configuration:


% /usr/lib/ab2/bin/ab2admin -o view_config [-m server_name] [-p server_port]

Changing Documentation Server Configuration

When you install the AnswerBook2 server software, certain variables are set to default values. Use the fields on the Modify Server Configuration page to change these values. You can change the following server settings:

These functions are also available through the administration command-line interface (ab2admin). For detailed information about the command-line interface, see the ab2admin(1m) man page. You can also edit the server_config_path/dwhttpd.cfg file (which defaults to /usr/lib/ab2/dweb/data/config/dwhttpd.cfg) to change these values.


Note -

If you change any of these values, you must stop and start the documentation server. Log in as root on the server machine and type the following commands:


# /usr/lib/ab2/bin/ab2admin -o stop
# /usr/lib/ab2/bin/ab2admin -o start

Using a Port Number Less Than 1024

Port numbers below 1024 are reserved for system use. To use one of these numbers (for example, port number 80) for the AnswerBook2 server, perform the following steps:

  1. Either use the Modify Configuration Settings function in the Admin GUI or edit the /usr/lib/ab2/dweb/data/config/dwhttpd.cfg file and change the following line:


    set ServerPort 8888

    To this:


    set ServerPort 80
  2. Edit the /usr/lib/ab2/dweb/data/config/nsapi.cfg file and change the following line:


    set ServerPort 8888

    To this:


    set ServerPort 80
  3. Edit the /etc/init.d/ab2mgr file and change the following line:


    su daemon -c "LD_PRELOAD=$pre_load;LANG=$LNG;AB2_ORIG_LANG=$ORGLNG;LD_LIBRARY_PATH=$LD_LIBP;EBT_REGISTRY=$ER;export LD_PRELOAD LD_LIBRARY_PATH LANG AB2_ORIG_LANG LC_ALL EBT_REGISTRY; $AB2BIN/dwhttpd $AB2CFG > /dev/null"

    To this:


    su root -c "LD_PRELOAD=$pre_load;LANG=$LNG;AB2_ORIG_LANG=$ORGLNG;LD_LIBRARY_PATH=$LD_LIBP;EBT_REGISTRY=$ER;export LD_PRELOAD LD_LIBRARY_PATH LANG AB2_ORIG_LANG LC_ALL EBT_REGISTRY; $AB2BIN/dwhttpd $AB2CFG > /dev/null"

    This allows the parent dwhttpd process to run as root, which can then use port 80. Note that the child dwhttpd process still runs as daemon.

Configuration Issues when Running the Server as a CGI Process

Because the AnswerBook2 server follows standard web protocols, you can run the AnswerBook2 server as a CGI process on an existing server, rather than as the default NSAPI server. For information on how to configure your server to run this way, see "Running the AnswerBook2 Documentation Server as a CGI Process".

If you run your documentation server as a CGI process, the following configuration settings will not display on the View Configuration Settings page of the Admin GUI:

The only option available on the Modify Server Configuration page will be turning on or turning off access control. All other functions will not display.

The following options for the ab2admin command will not work: