Полезная информация

Webmaster in a Nutshell

Previous Chapter 24 Next
 

24. CERN Server Configuration

Contents:
Basic Server Configuration
Resource Configuration
Translation Rules
Logging
Script Configuration
Directory Indexing
Access Control Configuration

The CERN server was originally developed at the European Laboratory for Particle Physics, formerly known as Counseil European pour la Recherche Nucleaire (CERN), and incidentally the birthplace of the Web. It is now maintained by the World Wide Web Consortium (W3C).

Unlike the NCSA and Apache servers, the CERN server uses a single configuration file, which contains all of the information the server needs to run. There are several example configuration files included with the software, which correspond to different modes of running the server. These are:

In addition to the directives themselves, the server configuration file may contain any number of blank lines or comment lines beginning with "#". Directive names are not case-sensitive, but the case conventions used in the example files will be used here.

This section lists all of the directives available for use in a regular HTTP server setup. For easier reference, the directives are grouped into categories based on their basic functionality. Access control configuration and related directives are discussed in the last section.

Setting up the server for proxy and caching service and related directives are not discussed here. Information on these setups and the server software itself can be found at http://www.w3.org.

24.1 Basic Server Configuration

The directives listed in this section are used to set general server parameters.

Disable

Disable method

The Disable directive tells the server to disallow certain HTTP request methods. By default, DELETE, PUT, CHECKIN, CHECKOUT, SHOWMETHOD, LINK, and UNLINK are all disabled.

DNSLookup

DNSLookup On|Off

The DNSLookup directive controls whether the server will attempt reverse DNS lookup of the client host during requests. The default is On.

Enable

Enable method

The Enable directive tells the server to allow certain HTTP request methods. By default, GET, HEAD, and POST are all enabled.

ErrorUrl

ErrorUrl error_code filename

The document to return when the specified error is returned.

GroupId

GroupId group_id

Specifies the group you want the server process to run as.

HostName

HostName hostname

Allows you to specify the preferred name for your server machine.

IdentityCheck

IdentityCheck On|Off

Specifies whether the server should attempt to learn the identity of the user for each request. By default identity checking is off.

InputTimeOut

InputTimeOut time

Specifies how long the server will wait for a request from the client after the connection has been opened. You may use any combination of hours (hours), minutes (mins), and seconds (secs). The default setting is:

InputTimeOut 2 mins

OutputTimeOut

OutputTimeOut time

Specifies how long the server will wait for the client to accept the response. The default setting is:

OutputTimeOut 20 mins

ParentGroupId

ParentGroupId group_id

Sets the group ID of the parent process right after binding to the port.

ParentUserId

ParentUserId user_id

Sets the user ID of the parent process right after binding to the port.

PidFile

PidFile filename

Specifies the location of the file into which the server should place its process id when running in standalone mode, either as an absolute path or as a relative path from the ServerRoot. This directive is needed if you plan to restart the server using the -restart command-line option. The default setting is:

PidFile /tmp/httpd-pid

Port

Port number

Specifies your server's port. The default port for standalone web servers is 80. For example, to set the port to 5234, use the following setting:

Port 5234

Specifying a port automatically sets the server to run in standalone mode, unless you have explicitly told it otherwise. If you want the server to run under inetd, you should set the ServerType directive to inetd, or not include a Port directive.

ScriptTimeOut

ScriptTimeOut time

Specifies how long the server will wait for a script to produce output to be sent to a client. The value is specified using any combination of hours (hours), minutes (mins), and seconds (secs). The default setting is:

ScriptTimeOut 5 mins

ServerRoot

ServerRoot directory_path

Specifies the directory in which all the server's associated files reside. This path is used as the root directory when relative paths are specified with other directives. For example:

ServerRoot /usr/local/etc/httpd/

ServerType

ServerType standalone|inetd

Specifies whether your server is to run in standalone mode or under inetd. The default value depends on whether the Port directive is used. If a port is specified, the default is standalone; if not, the default is inetd.

UserId

UserId user_id

Specifies the user you want the server process to run as.


Previous Home Next
Access Configuration--access.conf Book Index Resource Configuration

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell