All pastes #629595 Raw Edit

httpd.conf in details

public text v1 · immutable
#629595 ·published 2007-07-22 13:34 UTC
rendered paste body
httpd.conf - Detailed Explanation 

--------------------------------------------------------------------------------

The following is a detailed explanation of the directives found in httpd.conf. The links take you to the NCSA documentation for each directive.


--------------------------------------------------------------------------------

ServerType 
Possible values: inetd, standalone 
NCSA default: standalone 
Recommended value: standalone 

This directive is determines whether the server is spawned by the inetd process on a per query basis, or runs as a standalone process. For performance reasons, it is preferred to run it as a standalone process.

Note that it is only possible to run the server under inetd if it is started by the root account.


--------------------------------------------------------------------------------

Port 
Possible values: an integer value 0 - 65536 
NCSA default: 80 
Recommended value: 80 

This directive determines the port that the server wil listen on for querys from clients.

Ports below 1024 are reserved for use by standard services. These are usually listed in the file /etc/services. To use these ports, the server must be started as root. Port 80 is the standard port for HTTP servers. 

Ports above 1023 are available for use by any process, even those run as a normal user. If you are going to run the server as a normal user, pick a port above 1023. The most common choices in this case are 1080 and 8080.


--------------------------------------------------------------------------------

User 
Possible values: a string or numeric userid 
NCSA default: nobody 
Recommended value: nobody 

The format for this directive's value is either a string userid as defined in /etc/passwd, or a numeric userid prefixed by a pound sign "#".

This directive is only relevant when the server is started as root. Upon startup it will switch to this userid for itself and all child processes.

When the server is started by a normal user, it will always run under that users userid.

For a Sun running SunOS version 4 (Solaris version 1), use "nobody". 
For a Sun running SunOS version 5 (Solaris version 2), use "nobody". 
For a DECstation running Ultrix, use "nobody". 
For a DEC running OSF1, use "nobody". 
For an SGI running IRIX, use "nobody". 


--------------------------------------------------------------------------------

Group 
Possible values: a string or numeric groupid 
NCSA default: #-1 
Recommended value: nogroup 

The format for this directive's value is either a string groupid as defined in /etc/passwd, or a numeric groupid prefixed by a pound sign "#".

This directive is only relevant when the server is started as root. Upon startup it will switch to this groupid for itself and all child processes.

When the server is started by a normal user, it will always run under that users groupid.

For a Sun running SunOS version 4 (Solaris version 1), use "nogroup". 
For a Sun running SunOS version 5 (Solaris version 2), use "nogroup". 
For a DECstation running Ultrix, use "nogroup". 
For a DEC running OSF1, use "nogroup". 
For an SGI running IRIX, use "nogroup". 


--------------------------------------------------------------------------------

ServerAdmin 
Possible values: any valid e-mail address 
NCSA default: none 
Recommended value: your e-mail address 

Set this directive to your email address, so the server can inform your users of where to send their comments.


--------------------------------------------------------------------------------

ServerRoot 
Possible values: a complete pathname, specified from root 
NCSA default: /usr/local/etc/httpd 
Recommended value: your ServerRoot directory 

Set this directive to the complete directory name of where you installed the server configuration files.


--------------------------------------------------------------------------------

ServerName 
Possible values: a full host name, including domain name 
NCSA default: none (determined through system calls) 
Recommended value: www.dept.uci.edu 

This directive sets the hostname httpd will return to represent the machine it is running on.

Use this directive in the case where there is a nameserver alias pointing to your machine. For example, if your machine were actually named somehost.bio.uci.edu, but you wanted to have users access www.bio.uci.edu, you would create the appropriate nameserver entry and set this directive to www.bio.uci.edu. Your users would access the server through the name www.bio.uci.edu. If you moved the web service to a new machine, you could change the nameserver alias and your users would still be able to access the server through the same name.


--------------------------------------------------------------------------------

TimeOut 
Possible values: an integer value 
NCSA default: 1200 
Recommended value: 1200 

This directive sets the maximum amount of time the server will allow a connection to remain open. The default value of 1200 (20 minutes) is appropriate for most instances.


--------------------------------------------------------------------------------

ErrorLog 
Possible values: an absolute or relative filename 
NCSA default: logs/error_log 
Recommended value: logs/error_log 

This directive sets the location of the error log file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

TransferLog 
Possible values: an absolute or relative filename 
NCSA default: logs/access_log 
Recommended value: logs/access_log 

This directive sets the location of the access log file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

PidFile 
Possible values: an absolute or relative filename 
NCSA default: logs/httpd.pid 
Recommended value: logs/httpd.pid 

This directive sets the location of the process id log file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

AccessConfig 
Possible values: an absolute or relative filename 
NCSA default: conf/access.conf 
Recommended value: conf/access.conf 

This directive sets the location of the access configuration file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

ResourceConfig 
Possible values: an absolute or relative filename 
NCSA default: conf/srm.conf 
Recommended value: conf/srm.conf 

This directive sets the location of the resource configuration file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

TypesConfig 
Possible values: an absolute or relative filename 
NCSA default: conf/mime.types 
Recommended value: conf/mime.types 

This directive sets the location of the MIME types configuration file. If a relative filename is given, it is interpreted as starting from the ServerRoot.


--------------------------------------------------------------------------------

IdentityCheck 
Possible values: on, off 
NCSA default: off 
Recommended value: off 

With this directive set to on, the server will attempt to record the userid of each query to the server. Keep this directive set to off unless you are willing to devote a significant amount of network bandwidth to this function.


--------------------------------------------------------------------------------

Nathan C. Bush / httpd/httpd.conf.d.html / httpd.conf - Detailed Explanation 
Last revision date: July 28, 1994