Apache

♦ ServerRoot pathname: Specifies the directory where the Web server is located. By default, the configuration and log files are expected to reside in subdirectories of this directory. In Fedora Core, ServerRoot is set to /etc/httpd.

♦ ServerName www.company.com:80: Sets the server's host name to

www.company.com and the port number to 80. ServerName is used only when redirecting a Web page to another.

♦ ServerTokens Major|Minor|Min|Prod|OS|Full : Controls how much information is sent back to the client in the Server field of the header. Set the directive to Prod for a Server response that simply identifies the product name (in this case, Apache).

Book VIII Chapter 2

♦ StartServers num: Sets the number of child processes that start as soon as the Apache Web server runs. The default value is 8.

♦ MaxSpareServers num: Sets the desired maximum number of idle child-server processes (a child process is considered idle if it's not handling an HTTP request). The default value is 20.

♦ MinSpareServers num: Sets the desired minimum number of idle child server processes (a child process is considered idle if it's not handling an HTTP request). A new spare process is created every second if the number falls below this threshold. The default value is 5.

♦ Timeout numsec: Sets the number of seconds that the server waits for a client to send a query after the client establishes connection. The default Timeout is 300 seconds (five minutes).

♦ ErrorLog filename: Sets the file where httpd logs the errors it encounters. If the filename does not begin with a slash (/), the name is taken to be relative to ServerRoot. The default ErrorLog is /etc/ httpd/logs/error_log, but /etc/httpd/logs is a symbolic link to the /var/log/httpd directory. Therefore the log files are in /var/log/. httpd directory. Typical error-log entries include events, such as server restarts, and any warning messages, such as the following:

[Sat Mar 13 18:10:01 2004] [notice] Apache/2.0.48 (Fedora) configured -resuming normal operations

[Sat Mar 13 18:10:37 2004] [error] [client 192.168.0.3] File does not exist: /var/www/html/book

♦ TransferLog filename: Sets the file where httpd records all client accesses (including failed accesses). The default TransferLog is /var/ log/httpd/access_log. The following example shows how a typical access is recorded in this log file:

192.168.0.3 - - [13/Mar/2004:18:10:23 -0500] "GET / HTTP/1.1" 200 3888 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322)"

192.168.0.3 - - [13/Mar/2004:18:10:23 -0500] "GET /icons/apache_pb2.gif HTTP/1.1" 200 2414 "http://192.168.0.6/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT5.1; (R1 1.3); .NET CLR 1.1.4322)"

192.168.0.3 - - [13/Mar/2004:18:10:23 -0500] "GET /icons/powered_by_fedora.png HTTP/1.1" 200 2243 "http://192.168.0.6/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322)"

♦ LogFormat formatstring formatname: Specifies the format of log-file entries for the TransferLog. The CustomLog directive also uses this format to produce logs in a specific format.

♦ CustomLog filename formatname: Sets the name of the custom log file where httpd records all client accesses (including failed accesses) in a format specified by formatname (which you define using a LogFormat directive).

♦ PidFile filename: Sets the file where HTTPD stores its process ID. The default PidFile is /var/run/httpd.pid. You can use this information to kill or restart the HTTP daemon. The following example shows how to restart httpd:

Was this article helpful?

0 0

Post a comment