Pick a Free OS

User login

Navigation

Web server tutorial - Part 1

and then

/usr/conf/access.conf

unless you have overridden these with ResourceConfig and/or AccessConfig directives here.

Directives

The configuration directives are grouped into three basic sections:

1. Directives that control the operation of the Apache server process as a whole (the 'global environment').

2. Directives that define the parameters of the `main' or `default' server, which responds to requests that aren't handled by a virtual host. These directives also provide default values for the settings of all virtual hosts.

3. Settings for virtual hosts, which allow Web requests to be sent to different IP addresses or hostnames and have them handled by the same Apache server process.

Section 1: Global Environment

The directives in this section affect the overall operation of Apache, such as the number of concurrent requests it can handle or where it can find its configuration files.

ServerType: ServerType is either inetd, or standalone. Inetd mode is only supported on Unix platforms.

ServerRoot: The top of the directory tree under which the server's configuration, error, and log files are kept.

NOTE: If you intend to place this on an NFS (or otherwise network) mounted filesystem then please read the LockFile documentation (available at http://www.Apache.org/docs/mod/core.htmllockfile); You will save yourself a lot of trouble. Do not add a slash at the end of the directory path.

ServerRoot "/etc/httpd"

LockFile: The LockFile directive sets the path to the lockfile used when Apache is compiled with either

USE_FCNTL_SERIALIZED_ACCEPT or

USE_FLOCK_SERIALIZED_ACCEPT.

This directive should normally be left at its default value. The main reason for changing it is if the logs directory is NFS mounted, since the lockfile must be stored on a local disk. The PID of the main server process is automatically appended to the filename.

LockFile /var/lock/httpd.lock

PidFile: The file in which the server should record its process identification number when it starts.

PidFile /var/run/httpd.pid