### Apache HTTP Server Version 1.3

# Using Apache With Novell NetWare

This document explains how to install, configure and run Apache 1.3 under Novell NetWare 5.x and above. If you find any bugs, or wish to contribute in other ways, please use our bug reporting page.

The bug reporting page and new-httpd mailing list are not provided to answer questions about configuration or running Apache. Before you submit a bug report or request, first consult this document, the Frequently Asked Questions page and the other relevant documentation topics. If you still have a question or problem, post it to the novell.devsup.webserver newsgroup, where many Apache users are more than willing to answer new and obscure questions about using Apache on NetWare.

Most of this document assumes that you are installing Apache from a binary distribution. If you want to compile Apache yourself (possibly to help with development, or to track down bugs), see the section on Compiling Apache for NetWare below.

- Requirements
- Downloading Apache for NetWare
- Installing Apache for NetWare
- Running Apache for NetWare
- Configuring Apache for NetWare
- Compiling Apache for NetWare

## Requirements

Apache 1.3 is designed to run on NetWare 5.x and above and is installed by default on all NetWare 6 servers.

If running on NetWare 5.0 you must install Service Pack 5 or above.

If running on NetWare 5.1 you must install Service Pack 1 or above.

NetWare service packs are available here.

## Downloading Apache for NetWare

Information on the latest version of Apache can be found on the Apache web server at http://www.apache.org/. This will list the current release, any more recent alpha or beta-test releases, together with details of mirror web and anonymous ftp sites.

## Installing Apache for NetWare

There is no Apache install program for NetWare currently. You will need to compile apache and copy the files over to the server manually. An install program will be posted at a later date. If you are running NetWare 6, Apache for NetWare has been installed by default.

Follow these steps to install Apache on NetWare from the binary download (assuming you will install to sys:/apache):

- Unzip the binary download file to the root of the SYS: volume (may be installed to any volume)
- Edit the httpd.conf file setting ServerRoot and ServerName to reflect your correct server settings
- Add SYS:/APACHE to the search path. EXAMPLE: SEARCH ADD SYS:\APACHE

Follow these steps to install Apache on NetWare manually from your own build source (assuming you will install to sys:/apache):

- Create a directory called `Apache` on a NetWare volume
- Copy Apache.nlm, Apachec.nlm, htdigest.nlm, htpasswd.nlm, xmlparse.nlm, and xmltok.nlm to sys:/apache
- Create a directory under SYS:/APACHE called CONF
- Copy all the *.CONF-DIST-NW files to the SYS:/APACHE/CONF directory and rename them all as *.CONF files
- Copy the MIME.TYPES and magic files to SYS:/APACHE/CONF directory
- Copy all files and subdirectories in \apache-1.3\icons to SYS:/APACHE/ICONS
- Create the directory SYS:/APACHE/LOGS on the server
- Create the directory SYS:/APACHE/CGI-BIN on the server
- Create the directory SYS:/APACHE/MODULES and copy all nlm modules built into the modules directory
- Edit the HTTPD.CONF file setting ServerRoot and ServerName to reflect your correct server settings
- Add SYS:/APACHE to the search path. EXAMPLE: SEARCH ADD SYS:\APACHE

Apache may be installed to other volumes besides the default `sys` volume.

## Running Apache for NetWare

To start Apache just type apache at the console. This will load apache in the OS address space. If you prefer to load Apache in a protected address space you may specify the address space with the load statement as follows:

        load address space = apache apache

This will load Apache into an address space called apache. Running multiple instances of Apache concurrently on NetWare is possible by loading each instance into its own protected address space.

After starting Apache it will be listening to port 80 (unless you changed the `Port`, `Listen` or `BindAddress` directives in the configuration files). To connect to the server and access the default page, launch a browser and enter the server's name or address. This should respond with a welcome page, and a link to the Apache manual. If nothing happens or you get an error, look in the `error_log` file in the `logs` directory.

Once your basic installation is working, you should configure it properly by editing the files in the `conf` directory.

To unload Apache running in the OS address space just type the following at the console:

        unload apache

If apache is running in a protected address space specify the address space in the unload statement:

        unload address space = apache apache

When working with Apache it is important to know how it will find the configuration files. You can specify a configuration file on the command line in two ways:

- -f specifies a path to a particular configuration file

        apache -f "vol:/my server/conf/my.conf"

        apache -f test/test.conf

In these cases, the proper ServerRoot should be set in the configuration file.

If you don't specify a configuration file name with -f, Apache will use the file name compiled into the server, usually "conf/httpd.conf". Invoking Apache with the -V switch will display this value labeled as SERVER_CONFIG_FILE. Apache will then determine its ServerRoot by trying the following, in this order:

- A ServerRoot directive via a -C switch.
- The -d switch on the command line.
- Current working directory
- The server root compiled into the server.

The server root compiled into the server is usually "sys:/apache". invoking apache with the -V switch will display this value labeled as HTTPD_ROOT.

## Configuring Apache for NetWare

Apache is configured by files in the `conf` directory. These are the same as files used to configure the Unix version, but there are a few different directives for Apache on NetWare. See the Apache documentation for all the available directives.

The main differences in Apache for NetWare are:

- Because Apache for NetWare is multithreaded, it does not use a separate process for each request, as Apache does with Unix. Instead there are only threads running: a parent thread, and a child which handles the requests. Within the child each request is handled by a separate thread.

  So the "process"-management directives are different:

  MaxRequestsPerChild - Like the Unix directive, this controls how many requests a process will serve before exiting. However, unlike Unix, a process serves all the requests at once, not just one, so if this is set, it is recommended that a very high number is used. The recommended default, `MaxRequestsPerChild 0`, does not cause the process to ever exit.

  ThreadsPerChild - This directive is new, and tells the server how many threads it should use. This is the maximum number of connections the server can handle at once; be sure and set this number high enough for your site if you get a lot of hits. The recommended default is `ThreadsPerChild 50`.

  ThreadStackSize - This directive tells the server what size of stack to use for the individual threads. The recommended default is `ThreadStackSize 65536`.

  LogRotateDaily - This directive allows all custom logs to be rotated on a daily basis. The file name of each log will contain the date and time that the log was created. The default for this directive is "Off".

  LogRotateInterval - This directive allows all custom logs to be rotated on a specified interval. The file name of each log will contain the date and time that the log was created. The interval is specified as N minutes. The default is no interval or "0".

- The directives that accept filenames as arguments now must use NetWare filenames instead of Unix ones. However, because Apache uses Unix-style names internally, you must use forward slashes, not backslashes. Volumes can be used; if omitted, the drive with the Apache executable will be assumed.

- Apache for NetWare has the ability to load modules at runtime, without recompiling the server. If Apache is compiled normally, it will install a number of optional modules in the `\Apache\modules` directory. To activate these, or other modules, the new LoadModule directive must be used. For example, to active the status module, use the following (in addition to the status-activating directives in `access.conf`):

          LoadModule status_module modules/status

  Information on creating loadable modules is also available.

## Compiling Apache for NetWare

### Requirements:

The following development tools are required to build Apache 1.3 for NetWare:

- Metowerks CodeWarrior 6.0 or higher with NetWare PDK 3.0 or higher.
- NLM and NetWare Libraries for C (including CLIB and XPlat)
- LDAP Libraries for C
- AWK, SED and gmake(ver. 3.78.1) utilties available at http://developer.novell.com/ndk/apache.htm

### Building Apache using the NetWare makefiles:

- Set the following environment variables:
  - `set METROWERKS=<Base location of the MW CodeWarrior tools>`
  - `set NWSDKDIR=c:\Novell\NDK\nwsdk` - Location of the NetWare CLib SDK
  - `set LDAPSDK=c:\Novell\NDK\cldapsdk` - Location of the NetWare LDAP SDK
  - `set AP_WORK=<Base location of the apache-1.3 source files>`
  - `set GNUTOOLS=<Location of the AWK, SED and GMAKE utilities>`
- Unpack the Apache source code distribution into an appropriate directory.
- Change directory to \apache-1.3 and build Apache by envoking the `gmake -f nwgnumakefile` command. You can create a distribution directory by adding the `install` parameter to the command.

### Other Environment Variables:

- `set DEBUG=1` – Builds debug versions of all of the binaries and copies them to a `\debug` destination directory.
- `set MULTIPROC=1` – Builds multi-processor aware versions of all of the binaries.

### Additional make options:

- `gmake -f nwgnumakefile` – Builds release versions of all of the binaries and copies them to a `\release` destination directory.
- `gmake -f nwgnumakefile install` – Creates a complete Apache distribution with binaries, docs and additional support files in a `\dist\apache` directory.
- `gmake -f nwgnumakefile clean` – Cleans all object files and binaries from the `\release` or `\debug` build areas depending on whether `DEBUG` has been defined.

### Apache HTTP Server Version 1.3