From: Joshua Slive Date: Tue, 12 Sep 2000 16:34:48 +0000 (+0000) Subject: New doc describing configuration process. X-Git-Tag: APACHE_2_0_ALPHA_7~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17e0e038a2f2e3e1766eef70ae641d0db0dc4ac6;p=apache New doc describing configuration process. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86207 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/configuring.html b/docs/manual/configuring.html new file mode 100644 index 0000000000..fbe41c2f17 --- /dev/null +++ b/docs/manual/configuring.html @@ -0,0 +1,169 @@ + + + +Configuring Apache + + + + + +

Configuring Apache

+ +

Main Configuration Files

+ +

Apache is configured by placing directives in plain text configuration files. The main +configuration file is usually called httpd.conf. The +location of this file is set at compile-time, but may be overridden +with the -f command line flag. Some sites also have +srm.conf and access.conf files for historical +reasons. In addition, other configuration files may be added using +the Include +directive. Any directive may be placed in any of these configuration +files. Changes to the main configuration files are only recognized by +Apache when it is started or restarted. + +

+The server also reads a file containing mime document types; the +filename is set by the TypesConfig directive, and is mime.types by default. + +

Syntax of the Configuration Files

+ +

Directives in the configuration files are case-insensitive, but +arguments to directives are often case sensitive. Lines which begin +with the hash character "#" are considered comments, and are ignored. +Comments may not be included on a line after a configuration +directive. White space occurring before a directive +is ignored, so you may indent directives for clarity. + +

You can check your configuration files for syntax errors without +starting the server by using apachectl configtest +or the -t command line option. + +

Modules

+ +

Apache is a modular server. This implies that only the most basic +functionality is included in the core server. Extended features are +available through modules which can +be loaded into Apache. By default, a base set of modules is +included in the server at compile-time. If the server is compiled to +use dynamically loaded modules, then modules +can be compiled separately and added at any time using the LoadModule directive. +Otherwise, apache must be recompiled to add or remove modules. + +

To see which modules are currently compiled into the server, +you can use the -l command line option. + +

Scope of Directives

+ +

Directives placed in the main configuration files apply to the entire +server. If you wish to change the configuration for only a part of +the server, you can scope your directives by placing them in +<Directory>, +<DirectoryMatch>, +<Files>, +<FilesMatch>, +<Location>, + and +<LocationMatch> + +sections. These sections limit the application of the directives +which they enclose to particular filesystem locations or URLs. They +can also be nested, allowing for very fine grained configuration. + +

Apache has the capability to serve many different websites +simultaneously. This is called Virtual Hosting. +Directives can also be scoped by placing them inside +<VirtualHost> +sections, so that they will only apply to requests for a particular +website. + +

Although most directives can be placed in any of these sections, +some directives do not make sense in some contexts. For example, +directives controlling process creation can only be placed in the main +server context. To find which directives can be placed in which +sections, check the Context of the directive. +For further information, we provide details on How Directory, Location and Files sections +work. + +

.htaccess Files

+ +

Apache allows for decentralized management of configuration via +special files placed inside the web tree. The special files are +usually called .htaccess, but any name can be specified +in the AccessFileName directive. Directives placed in +.htaccess files apply to the directory where you place +the file, and all sub-directories. The .htaccess files +follow the same syntax as the main configuration files. Since +.htaccess files are read on every request, rather than +only at server startup, changes made in these files take immediate +effect. + +

To find which directives can be placed in .htaccess +files, check the Context +of the directive. The server administrator further controls what +directives may be placed in .htaccess files by +configuring the AllowOverride +directive in the main configuration files. + +

Log files

+

security warning

+Anyone who can write to the directory where Apache is writing a +log file can almost certainly gain access to the uid that the server is +started as, which is normally root. Do NOT give people write +access to the directory the logs are stored in without being aware of +the consequences; see the security tips +document for details. + +

pid file

+ +

On startup, Apache saves the process id of the parent httpd process to +the file logs/httpd.pid. This filename can be changed +with the PidFile directive. The +process-id is for use by the administrator in restarting and +terminating the daemon: on Unix, a HUP or USR1 signal causes the +daemon to re-read its configuration files and a TERM signal causes it +to die gracefully; on Windows, use the -k command line option instead. +For more information see the Stopping and +Restarting page. + +

+If the process dies (or is killed) abnormally, then it will be necessary to +kill the children httpd processes. + +

Error log

+ +

The server will log error messages to a log file, by default +logs/error_log on Unix or logs/error.log on +Windows and OS/2. The filename can be set using the ErrorLog directive; different error +logs can be set for different virtual hosts. + +

Transfer log

+ +

The server will typically log each request to a transfer file, by +default logs/access_log on Unix or +logs/access.log on Windows and OS/2. The filename can be +set using a CustomLog +directive; different transfer logs can be set for different virtual hosts. + + + + + diff --git a/docs/manual/configuring.html.en b/docs/manual/configuring.html.en new file mode 100644 index 0000000000..fbe41c2f17 --- /dev/null +++ b/docs/manual/configuring.html.en @@ -0,0 +1,169 @@ + + + +Configuring Apache + + + + + +

Configuring Apache

+ +

Main Configuration Files

+ +

Apache is configured by placing directives in plain text configuration files. The main +configuration file is usually called httpd.conf. The +location of this file is set at compile-time, but may be overridden +with the -f command line flag. Some sites also have +srm.conf and access.conf files for historical +reasons. In addition, other configuration files may be added using +the Include +directive. Any directive may be placed in any of these configuration +files. Changes to the main configuration files are only recognized by +Apache when it is started or restarted. + +

+The server also reads a file containing mime document types; the +filename is set by the TypesConfig directive, and is mime.types by default. + +

Syntax of the Configuration Files

+ +

Directives in the configuration files are case-insensitive, but +arguments to directives are often case sensitive. Lines which begin +with the hash character "#" are considered comments, and are ignored. +Comments may not be included on a line after a configuration +directive. White space occurring before a directive +is ignored, so you may indent directives for clarity. + +

You can check your configuration files for syntax errors without +starting the server by using apachectl configtest +or the -t command line option. + +

Modules

+ +

Apache is a modular server. This implies that only the most basic +functionality is included in the core server. Extended features are +available through modules which can +be loaded into Apache. By default, a base set of modules is +included in the server at compile-time. If the server is compiled to +use dynamically loaded modules, then modules +can be compiled separately and added at any time using the LoadModule directive. +Otherwise, apache must be recompiled to add or remove modules. + +

To see which modules are currently compiled into the server, +you can use the -l command line option. + +

Scope of Directives

+ +

Directives placed in the main configuration files apply to the entire +server. If you wish to change the configuration for only a part of +the server, you can scope your directives by placing them in +<Directory>, +<DirectoryMatch>, +<Files>, +<FilesMatch>, +<Location>, + and +<LocationMatch> + +sections. These sections limit the application of the directives +which they enclose to particular filesystem locations or URLs. They +can also be nested, allowing for very fine grained configuration. + +

Apache has the capability to serve many different websites +simultaneously. This is called Virtual Hosting. +Directives can also be scoped by placing them inside +<VirtualHost> +sections, so that they will only apply to requests for a particular +website. + +

Although most directives can be placed in any of these sections, +some directives do not make sense in some contexts. For example, +directives controlling process creation can only be placed in the main +server context. To find which directives can be placed in which +sections, check the Context of the directive. +For further information, we provide details on How Directory, Location and Files sections +work. + +

.htaccess Files

+ +

Apache allows for decentralized management of configuration via +special files placed inside the web tree. The special files are +usually called .htaccess, but any name can be specified +in the AccessFileName directive. Directives placed in +.htaccess files apply to the directory where you place +the file, and all sub-directories. The .htaccess files +follow the same syntax as the main configuration files. Since +.htaccess files are read on every request, rather than +only at server startup, changes made in these files take immediate +effect. + +

To find which directives can be placed in .htaccess +files, check the Context +of the directive. The server administrator further controls what +directives may be placed in .htaccess files by +configuring the AllowOverride +directive in the main configuration files. + +

Log files

+

security warning

+Anyone who can write to the directory where Apache is writing a +log file can almost certainly gain access to the uid that the server is +started as, which is normally root. Do NOT give people write +access to the directory the logs are stored in without being aware of +the consequences; see the security tips +document for details. + +

pid file

+ +

On startup, Apache saves the process id of the parent httpd process to +the file logs/httpd.pid. This filename can be changed +with the PidFile directive. The +process-id is for use by the administrator in restarting and +terminating the daemon: on Unix, a HUP or USR1 signal causes the +daemon to re-read its configuration files and a TERM signal causes it +to die gracefully; on Windows, use the -k command line option instead. +For more information see the Stopping and +Restarting page. + +

+If the process dies (or is killed) abnormally, then it will be necessary to +kill the children httpd processes. + +

Error log

+ +

The server will log error messages to a log file, by default +logs/error_log on Unix or logs/error.log on +Windows and OS/2. The filename can be set using the ErrorLog directive; different error +logs can be set for different virtual hosts. + +

Transfer log

+ +

The server will typically log each request to a transfer file, by +default logs/access_log on Unix or +logs/access.log on Windows and OS/2. The filename can be +set using a CustomLog +directive; different transfer logs can be set for different virtual hosts. + + + + + diff --git a/docs/manual/index.html b/docs/manual/index.html index 1e5850712c..3c209ede45 100644 --- a/docs/manual/index.html +++ b/docs/manual/index.html @@ -31,6 +31,7 @@

  • Compiling and Installing
  • Starting
  • Stopping or Restarting +
  • Configuring
  • Run-time configuration directives
  • Modules: By Type or Alphabetical diff --git a/docs/manual/index.html.en b/docs/manual/index.html.en index 1e5850712c..3c209ede45 100644 --- a/docs/manual/index.html.en +++ b/docs/manual/index.html.en @@ -31,6 +31,7 @@
  • Compiling and Installing
  • Starting
  • Stopping or Restarting +
  • Configuring
  • Run-time configuration directives
  • Modules: By Type or Alphabetical diff --git a/docs/manual/invoking.html b/docs/manual/invoking.html index 02ee07659f..4309e1d6fe 100644 --- a/docs/manual/invoking.html +++ b/docs/manual/invoking.html @@ -139,82 +139,6 @@ is one of "shutdown" or "restart". (Apache 1.3.3 and later). -

    Configuration files

    -The server will read three files for configuration directives. Any -directive may appear in any of these files. The the names of these -files are taken to be relative to the server root; this is set by the -ServerRoot directive, the --d command line flag, or (on Windows only) the registry -(see Running Apache for Windows). - -Conventionally, the files are: -
    -
    conf/httpd.conf -
    Contains directives that control the operation of the server daemon. -The filename may be overridden with the -f command line flag. - -
    conf/srm.conf -
    Contains directives that control the specification of documents that -the server can provide to clients. The filename may be overridden with -the ResourceConfig directive. - -
    conf/access.conf -
    Contains directives that control access to documents. -The filename may be overridden with the -AccessConfig directive. -
    -However, these conventions need not be adhered to. -

    -The server also reads a file containing mime document types; the filename -is set by the TypesConfig -directive, -and is conf/mime.types by default. - -

    Log files

    -

    security warning

    -Anyone who can write to the directory where Apache is writing a -log file can almost certainly gain access to the uid that the server is -started as, which is normally root. Do NOT give people write -access to the directory the logs are stored in without being aware of -the consequences; see the security tips -document for details. -

    pid file

    - -On startup, Apache saves the process id of the parent httpd process to -the file logs/httpd.pid. This filename can be changed -with the PidFile directive. The -process-id is for use by the administrator in restarting and -terminating the daemon: on Unix, a HUP or USR1 signal causes the -daemon to re-read its configuration files and a TERM signal causes it -to die gracefully; on Windows, use the -k command line option instead. -For more information see the Stopping and -Restarting page. - -

    -If the process dies (or is killed) abnormally, then it will be necessary to -kill the children httpd processes. - -

    Error log

    - -The server will log error messages to a log file, by default -logs/error_log on Unix or logs/error.log on -Windows and OS/2. The filename can be set using the ErrorLog directive; different error -logs can be set for different virtual hosts. - -

    Transfer log

    - -The server will typically log each request to a transfer file, by -default logs/access_log on Unix or -logs/access.log on Windows and OS/2. The filename can be -set using a TransferLog directive -or additional log files created with the CustomLog directive; -different transfer logs can be set for different virtual hosts. - diff --git a/docs/manual/invoking.html.en b/docs/manual/invoking.html.en index 02ee07659f..4309e1d6fe 100644 --- a/docs/manual/invoking.html.en +++ b/docs/manual/invoking.html.en @@ -139,82 +139,6 @@ is one of "shutdown" or "restart". (Apache 1.3.3 and later). -

    Configuration files

    -The server will read three files for configuration directives. Any -directive may appear in any of these files. The the names of these -files are taken to be relative to the server root; this is set by the -ServerRoot directive, the --d command line flag, or (on Windows only) the registry -(see Running Apache for Windows). - -Conventionally, the files are: -
    -
    conf/httpd.conf -
    Contains directives that control the operation of the server daemon. -The filename may be overridden with the -f command line flag. - -
    conf/srm.conf -
    Contains directives that control the specification of documents that -the server can provide to clients. The filename may be overridden with -the ResourceConfig directive. - -
    conf/access.conf -
    Contains directives that control access to documents. -The filename may be overridden with the -AccessConfig directive. -
    -However, these conventions need not be adhered to. -

    -The server also reads a file containing mime document types; the filename -is set by the TypesConfig -directive, -and is conf/mime.types by default. - -

    Log files

    -

    security warning

    -Anyone who can write to the directory where Apache is writing a -log file can almost certainly gain access to the uid that the server is -started as, which is normally root. Do NOT give people write -access to the directory the logs are stored in without being aware of -the consequences; see the security tips -document for details. -

    pid file

    - -On startup, Apache saves the process id of the parent httpd process to -the file logs/httpd.pid. This filename can be changed -with the PidFile directive. The -process-id is for use by the administrator in restarting and -terminating the daemon: on Unix, a HUP or USR1 signal causes the -daemon to re-read its configuration files and a TERM signal causes it -to die gracefully; on Windows, use the -k command line option instead. -For more information see the Stopping and -Restarting page. - -

    -If the process dies (or is killed) abnormally, then it will be necessary to -kill the children httpd processes. - -

    Error log

    - -The server will log error messages to a log file, by default -logs/error_log on Unix or logs/error.log on -Windows and OS/2. The filename can be set using the ErrorLog directive; different error -logs can be set for different virtual hosts. - -

    Transfer log

    - -The server will typically log each request to a transfer file, by -default logs/access_log on Unix or -logs/access.log on Windows and OS/2. The filename can be -set using a TransferLog directive -or additional log files created with the CustomLog directive; -different transfer logs can be set for different virtual hosts. -