From f1a774074e2fbe05b4075d6cf84ca317c0a6edca Mon Sep 17 00:00:00 2001
From: =?utf8?q?Igor=20Gali=C4=87?=
Date: Wed, 25 Apr 2012 14:13:36 +0000
Subject: [PATCH] fixup examples in core.xml with syntax highlighting
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1330302 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/core.xml | 848 ++++++++++++++++++---------------------
1 file changed, 396 insertions(+), 452 deletions(-)
diff --git a/docs/manual/mod/core.xml b/docs/manual/mod/core.xml
index 852e62174a..4d31511e84 100644
--- a/docs/manual/mod/core.xml
+++ b/docs/manual/mod/core.xml
@@ -48,7 +48,9 @@ On Windows from Apache httpd 2.3.3 and later.
Using none
for an argument will disable any accept filters
for that protocol. This is useful for protocols that require a server
send data first, such as ftp:
or nntp
:
- AcceptFilter nntp none
+
+AcceptFilter nntp none
+
The default protocol names are https
for port 443
and http
for all other ports. To specify another protocol
@@ -57,10 +59,10 @@ On Windows from Apache httpd 2.3.3 and later.
directive.
The default values on FreeBSD are:
-
- AcceptFilter http httpready
- AcceptFilter https dataready
-
+
+AcceptFilter http httpready
+AcceptFilter https dataready
+
The httpready
accept filter buffers entire HTTP requests at
the kernel level. Once an entire request is received, the kernel then
@@ -71,10 +73,10 @@ On Windows from Apache httpd 2.3.3 and later.
accf_data(9) filter is used.
The default values on Linux are:
-
- AcceptFilter http data
- AcceptFilter https data
-
+
+AcceptFilter http data
+AcceptFilter https data
+
Linux's TCP_DEFER_ACCEPT
does not support buffering http
requests. Any value besides none
will enable
@@ -84,10 +86,10 @@ On Windows from Apache httpd 2.3.3 and later.
tcp(7) man page.
The default values on Windows are:
-
- AcceptFilter http data
- AcceptFilter https data
-
+
+AcceptFilter http data
+AcceptFilter https data
+
Window's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx()
API, and does not support http protocol buffering. There are two values
@@ -170,15 +172,13 @@ On Windows from Apache httpd 2.3.3 and later.
the request, so you can use the following configuration to enable
such a script:
-
- <Files "mypaths.shtml">
-
- Options +Includes
- SetOutputFilter INCLUDES
- AcceptPathInfo On
-
- </Files>
-
+
+<Files "mypaths.shtml">
+ Options +Includes
+ SetOutputFilter INCLUDES
+ AcceptPathInfo On
+</Files>
+
@@ -198,9 +198,9 @@ On Windows from Apache httpd 2.3.3 and later.
configuration files are enabled for that
directory. For example:
-
Be careful with the directory-path arguments:
@@ -753,9 +750,9 @@ named file-system directory, sub-directories, and their contents.
expressions can also be used, with the addition of the
~
character. For example:
-
- <Directory ~ "^/www/.*/[0-9]{3}">
-
+
+<Directory ~ "^/www/.*/[0-9]{3}">
+
would match directories in /www/
that consisted of
three numbers.
@@ -768,19 +765,15 @@ named file-system directory, sub-directories, and their contents.
href="#accessfilename">.htaccess files. For example,
with
-
- <Directory />
-
- AllowOverride None
-
- </Directory>
-
- <Directory /home>
-
- AllowOverride FileInfo
-
- </Directory>
-
+
+<Directory />
+ AllowOverride None
+</Directory>
+
+<Directory "/home">
+ AllowOverride FileInfo
+</Directory>
+
for access to the document /home/web/dir/doc.html
the steps are:
@@ -802,13 +795,11 @@ named file-system directory, sub-directories, and their contents.
expressions are tested in the order they appeared in the
configuration file. For example, with
-
- <Directory ~ abc$>
-
- # ... directives here ...
-
- </Directory>
-
+
+<Directory ~ "abc$">
+# ... directives here ...
+</Directory>
+
the regular expression section won't be considered until after
all normal Directorys and
@@ -823,13 +814,11 @@ named file-system directory, sub-directories, and their contents.
recommended that you change this with a block such
as
-
- <Directory />
-
- Require all denied
-
- </Directory>
-
+
+<Directory />
+ Require all denied
+</Directory>
+
and then override this for directories you
want accessible. See the regular expression. For example:
-
- <DirectoryMatch "^/www/(.+/)?[0-9]{3}">
-
+
+<DirectoryMatch "^/www/(.+/)?[0-9]{3}">
+
would match directories in /www/
that consisted of three
numbers.
@@ -911,9 +900,9 @@ from the web
path from the requested URL to the document root to make the
path to the document. Example:
-
- DocumentRoot /usr/web
-
+
+DocumentRoot "/usr/web"
+
then an access to
http://my.example.com/index.html
refers to
@@ -948,14 +937,14 @@ satisfied by a request at runtime
in the same scope has not been applied.
For example: In
-
- <If "-z req('Host')">
- ...
- </If>
- <Else>
- ...
- </Else>
-
+
+<If "-z req('Host')">
+# ...
+</If>
+<Else>
+# ...
+</Else>
+
The If would match HTTP/1.0
requests without a Host: header and the
@@ -993,17 +982,17 @@ satisfied
ElseIf section in the same scope has
not been applied. For example: In
-
- <If "-R '10.1.0.0/16'">
- ...
- </If>
- <ElseIf "-R '10.0.0.0/8'">
- ...
- </ElseIf>
- <Else>
- ...
- </Else>
-
+
+<If "-R '10.1.0.0/16'">
+#...
+</If>
+<ElseIf "-R '10.0.0.0/8'">
+#...
+</ElseIf>
+<Else>
+#...
+</Else>
+
The ElseIf would match if
the remote address of a request belongs to the subnet 10.0.0.0/8 but
@@ -1058,20 +1047,18 @@ for a complete reference and more examples.
For server configurations that are vulnerable to these problems,
you should disable memory-mapping of delivered files by specifying:
-
- EnableMMAP Off
-
+
+EnableMMAP Off
+
For NFS mounted files, this feature may be disabled explicitly for
the offending files by specifying:
-
- <Directory "/path-to-nfs-files">
-
- EnableMMAP Off
-
- </Directory>
-
+
+<Directory "/path-to-nfs-files">
+ EnableMMAP Off
+</Directory>
+
@@ -1118,20 +1105,18 @@ version 2.3.9.
For server configurations that are not vulnerable to these problems,
you may enable this feature by specifying:
-
- EnableSendfile On
-
+
+EnableSendfile On
+
For network mounted files, this feature may be disabled explicitly
for the offending files by specifying:
-
- <Directory "/path-to-nfs-files">
-
- EnableSendfile Off
-
- </Directory>
-
+
+<Directory "/path-to-nfs-files">
+ EnableSendfile Off
+</Directory>
+
Please note that the per-directory and .htaccess configuration
of EnableSendfile is not supported by
mod_cache_disk.
@@ -1156,24 +1141,25 @@ version 2.3.9.
configuration parsing. The typical use is for reporting required
modules which are missing from the configuration.
- Example
- # ensure that mod_include is loaded
- <IfModule !include_module>
- Error mod_include is required by mod_foo. Load it with LoadModule.
- </IfModule>
-
- # ensure that exactly one of SSL,NOSSL is defined
- <IfDefine SSL>
- <IfDefine NOSSL>
- Error Both SSL and NOSSL are defined. Define only one of them.
- </IfDefine>
- </IfDefine>
- <IfDefine !SSL>
- <IfDefine !NOSSL>
- Error Either SSL or NOSSL must be defined.
- </IfDefine>
- </IfDefine>
-
+
+Example
+# ensure that mod_include is loaded
+<IfModule !include_module>
+ Error mod_include is required by mod_foo. Load it with LoadModule.
+</IfModule>
+
+# ensure that exactly one of SSL,NOSSL is defined
+<IfDefine SSL>
+<IfDefine NOSSL>
+ Error Both SSL and NOSSL are defined. Define only one of them.
+</IfDefine>
+</IfDefine>
+<IfDefine !SSL>
+<IfDefine !NOSSL>
+ Error Either SSL or NOSSL must be defined.
+</IfDefine>
+</IfDefine>
+
@@ -1215,13 +1201,13 @@ in case of an error
full URL which the client can resolve. Alternatively, a message
can be provided to be displayed by the browser. Examples:
-
- ErrorDocument 500 http://foo.example.com/cgi-bin/tester
- ErrorDocument 404 /cgi-bin/bad_urls.pl
- ErrorDocument 401 /subscription_info.html
- ErrorDocument 403 "Sorry can't allow you access today"
- ErrorDocument 403 Forbidden!
-
+
+ErrorDocument 500 http://foo.example.com/cgi-bin/tester
+ErrorDocument 404 /cgi-bin/bad_urls.pl
+ErrorDocument 401 /subscription_info.html
+ErrorDocument 403 "Sorry can't allow you access today"
+ErrorDocument 403 Forbidden!
+
Additionally, the special value default
can be used
to specify Apache httpd's simple hardcoded message. While not required
@@ -1229,14 +1215,14 @@ in case of an error
Apache httpd's simple hardcoded message for configurations that would
otherwise inherit an existing ErrorDocument.
-
- ErrorDocument 404 /cgi-bin/bad_urls.pl
- <Directory /web/docs>
-
- ErrorDocument 404 default
-
- </Directory>
-
+
+ErrorDocument 404 /cgi-bin/bad_urls.pl
+
+
+<Directory /web/docs>
+ ErrorDocument 404 default
+</Directory>
+
Note that when you specify an ErrorDocument
that points to a remote URL (ie. anything with a method such as
@@ -1296,17 +1282,17 @@ in case of an error
the file-path is not absolute then it is assumed to be
relative to the ServerRoot.
- Example
- ErrorLog /var/log/httpd/error_log
-
+ Example
+ErrorLog "/var/log/httpd/error_log"
+
If the file-path
begins with a pipe character "|
" then it is assumed to be a
command to spawn to handle the error log.
- Example
- ErrorLog "|/usr/local/bin/httpd_errors"
-
+ Example
+ErrorLog "|/usr/local/bin/httpd_errors"
+
See the notes on piped logs for
more information.
@@ -1320,9 +1306,9 @@ in case of an error
in individual virtual hosts, the final facility specified affects the
entire server.
- Example
- ErrorLog syslog:user
-
+ Example
+ErrorLog syslog:user
+
SECURITY: See the security tips
@@ -1353,9 +1339,9 @@ in case of an error
supplementary information is logged in the error log in addition to the
actual log message.
- Simple example
- ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
-
+ Simple example
+ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"
+
Specifying connection
or request
as first
parameter allows to specify additional formats, causing additional
@@ -1519,32 +1505,30 @@ in case of an error
with error log lines. If mod_unique_id is loaded, its
unique id will be used as log ID for requests.
- Example (default format)
- ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a]
- %M% ,\ referer\ %{Referer}i"
-
+ Example (default format)
+ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
+
This would result in error messages such as:
-
+
[Thu May 12 08:28:57.652118 2011] [core:error] [pid 8777:tid 4326490112] [client ::1:58619] File does not exist: /usr/local/apache2/htdocs/favicon.ico
Notice that, as discussed above, some fields are ommitted
entirely because they are not defined.
- Example (similar to the 2.2.x format)
- ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a]
- %M% ,\ referer\ %{Referer}i"
-
+ Example (similar to the 2.2.x format)
+ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
+
- Advanced example with request/connection log IDs
- ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
- ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
- ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
- ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
- ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
-
+ Advanced example with request/connection log IDs
+ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M"
+ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T"
+ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'"
+ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'"
+ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"
+
ErrorLog
@@ -1619,7 +1603,7 @@ earlier.
The number of bytes in the file will be included
All
All available fields will be used. This is equivalent to:
- FileETag INode MTime Size
+ FileETag INode MTime Size
None
If a document is file-based, no ETag
field will be
included in the response
@@ -1690,9 +1674,9 @@ filenames
can also be used, with the addition of the
~
character. For example:
-
- <Files ~ "\.(gif|jpe?g|png)$">
-
+
+<Files ~ "\.(gif|jpe?g|png)$">
+
would match most common Internet graphics formats. FilesMatch is preferred,
@@ -1728,9 +1712,9 @@ filenames
does. However, it accepts a regular
expression. For example:
-
- <FilesMatch "\.(gif|jpe?g|png)$">
-
+
+<FilesMatch "\.(gif|jpe?g|png)$">
+
would match most common Internet graphics formats.
@@ -1761,9 +1745,9 @@ media type in the HTTP Content-Type header field
GIF files, but did not want to label them all with .gif
,
you might want to use:
-
- ForceType image/gif
-
+
+ForceType image/gif
+
Note that this directive overrides other indirect media type
associations defined in mime.types or via the
@@ -1773,21 +1757,17 @@ media type in the HTTP Content-Type header field
ForceType settings
by using the value of None
:
-
- # force all files to be image/gif:
- <Location /images>
-
- ForceType image/gif
-
- </Location>
-
- # but normal mime-type associations here:
- <Location /images/mixed>
-
- ForceType None
-
- </Location>
-
+
+# force all files to be image/gif:
+<Location /images>
+ ForceType image/gif
+</Location>
+
+# but normal mime-type associations here:
+<Location /images/mixed>
+ ForceType None
+</Location>
+
This directive primarily overrides the content types generated for
static files served out of the filesystem. For resources other than
@@ -1877,9 +1857,9 @@ satisfied by a request at runtime
directives if and only if the expression evaluates to true.
For example:
-
- <If "-z req('Host')">
-
+
+<If "-z req('Host')">
+
would match HTTP/1.0 requests without a Host: header.
Expressions may contain various shell-like operators for string
@@ -1888,9 +1868,9 @@ satisfied by a request at runtime
and others (-n
, -z
, -f
, ...).
It is also possible to use regular expressions,
-
- <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">
-
+
+<If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">
+
shell-like pattern matches and many other operations. These operations
can be done on request headers (req
), environment variables
@@ -1955,32 +1935,22 @@ if a test is true at startup
nest-able, which can be used to implement simple
multiple-parameter tests. Example:
-
- httpd -DReverseProxy -DUseCache -DMemCache ...
-
- # httpd.conf
- <IfDefine ReverseProxy>
-
- LoadModule proxy_module modules/mod_proxy.so
- LoadModule proxy_http_module modules/mod_proxy_http.so
- <IfDefine UseCache>
-
- LoadModule cache_module modules/mod_cache.so
- <IfDefine MemCache>
-
- LoadModule mem_cache_module modules/mod_mem_cache.so
-
- </IfDefine>
- <IfDefine !MemCache>
-
- LoadModule cache_disk_module modules/mod_cache_disk.so
-
- </IfDefine>
-
- </IfDefine>
-
- </IfDefine>
-
+ httpd -DReverseProxy -DUseCache -DMemCache ...
+
+<IfDefine ReverseProxy>
+ LoadModule proxy_module modules/mod_proxy.so
+ LoadModule proxy_http_module modules/mod_proxy_http.so
+ <IfDefine UseCache>
+ LoadModule cache_module modules/mod_cache.so
+ <IfDefine MemCache>
+ LoadModule mem_cache_module modules/mod_mem_cache.so
+ </IfDefine>
+ <IfDefine !MemCache>
+ LoadModule cache_disk_module modules/mod_cache_disk.so
+ </IfDefine>
+ </IfDefine>
+</IfDefine>
+
@@ -2077,33 +2047,33 @@ wildcard matching available in 2.3.6 and later
Examples:
-
+
Include /usr/local/apache2/conf/ssl.conf
Include /usr/local/apache2/conf/vhosts/*.conf
-
+
Or, providing paths relative to your ServerRoot directory:
-
- Include conf/ssl.conf
- Include conf/vhosts/*.conf
-
+
+Include conf/ssl.conf
+Include conf/vhosts/*.conf
+
Wildcards may be included in the directory or file portion of the
path. This example will fail if there is no subdirectory in conf/vhosts
that contains at least one *.conf file:
-
- Include conf/vhosts/*/*.conf
-
+
+Include conf/vhosts/*/*.conf
+
Alternatively, the following command will just be ignored in case of
missing files or directories:
-
- IncludeOptional conf/vhosts/*/*.conf
-
+
+IncludeOptional conf/vhosts/*/*.conf
+
@@ -2226,13 +2196,11 @@ methods
only to the methods POST
, PUT
, and
DELETE
, leaving all other methods unprotected:
-
- <Limit POST PUT DELETE>
-
- Require valid-user
-
- </Limit>
-
+
+<Limit POST PUT DELETE>
+ Require valid-user
+</Limit>
+
The method names listed can be one or more of: GET
,
POST
, PUT
, DELETE
,
@@ -2272,18 +2240,14 @@ methods
Require group editors
directive will be ignored
in all cases:
-
- <LimitExcept GET>
-
- Require valid-user
-
- </LimitExcept>
- <Limit POST>
-
- Require group editors
-
- </Limit>
-
+
+<LimitExcept GET>
+ Require valid-user
+</LimitExcept>
+<Limit POST>
+ Require group editors
+</Limit>
+
@@ -2310,13 +2274,11 @@ except the named ones
For example:
-
- <LimitExcept POST GET>
-
- Require valid-user
-
- </LimitExcept>
-
+
+<LimitExcept POST GET>
+ Require valid-user
+</LimitExcept>
+
@@ -2350,9 +2312,9 @@ subrequests
determines, how deep subrequests may be nested. If you specify only one
number, it will be assigned to both limits.
- Example
- LimitInternalRecursion 5
-
+ Example
+LimitInternalRecursion 5
+
@@ -2395,9 +2357,9 @@ from the client
location, and wish to limit the size of the uploaded file to 100K,
you might use the following directive:
-
- LimitRequestBody 102400
-
+
+LimitRequestBody 102400
+
For a full description of how this directive is interpreted by
proxy requests, see the mod_proxy documentation.
@@ -2440,9 +2402,9 @@ will be accepted from the client
For example:
-
- LimitRequestFields 50
-
+
+LimitRequestFields 50
+
Warning
When name-based virtual hosting is used, the value for this
@@ -2481,9 +2443,9 @@ client
For example:
-
- LimitRequestFieldSize 4094
-
+
+LimitRequestFieldSize 4094
+
Under normal conditions, the value should not be changed from
the default. Also, you can't set this higher than 8190 without
@@ -2525,9 +2487,9 @@ from the client
For example:
-
- LimitRequestLine 4094
-
+
+LimitRequestLine 4094
+
Under normal conditions, the value should not be changed from
the default. Also, you can't set this higher than 8190 without
@@ -2557,9 +2519,9 @@ from the client
Example:
-
- LimitXMLRequestBody 0
-
+
+LimitXMLRequestBody 0
+
@@ -2610,19 +2572,19 @@ URLs
/private1, /private1/ and /private1/file.txt will have the enclosed
directives applied, but /private1other would not.
-
- <Location /private1>
- ...
-
+
+<Location /private1>
+# ...
+
In the example below, where a trailing slash is used, requests to
/private2/ and /private2/file.txt will have the enclosed
directives applied, but /private2 and /private2other would not.
-
- <Location /private2/>
- ...
-
+
+<Location /private2/>
+# ...
+
When to use Location
@@ -2651,9 +2613,9 @@ URLs
can also be used, with the addition of the ~
character. For example:
-
- <Location ~ "/(extra|special)/data">
-
+
+<Location ~ "/(extra|special)/data">
+
would match URLs that contained the substring /extra/data
or /special/data
. The directive
directive. For example, to enable status requests, but allow them
only from browsers at example.com
, you might use:
-
- <Location /status>
-
- SetHandler server-status
- Require host example.com
-
- </Location>
-
+
+<Location /status>
+ SetHandler server-status
+ Require host example.com
+</Location>
+
Note about / (slash)
The slash character has special meaning depending on where in a
@@ -2722,9 +2682,9 @@ matching URLs
it takes a regular expression
as an argument instead of a simple string. For example:
-
- <LocationMatch "/(extra|special)/data">
-
+
+<LocationMatch "/(extra|special)/data">
+
would match URLs that contained the substring /extra/data
or /special/data
.
@@ -2901,9 +2861,9 @@ matching URLs
For example:
-
- LogLevel notice
-
+
+LogLevel notice
+
Note
When logging to a regular file messages of the level
@@ -2920,20 +2880,20 @@ matching URLs
as module specification. This means the following three specifications
are equivalent:
-
- LogLevel info ssl:warn
- LogLevel info mod_ssl.c:warn
- LogLevel info ssl_module:warn
-
+
+LogLevel info ssl:warn
+LogLevel info mod_ssl.c:warn
+LogLevel info ssl_module:warn
+
It is also possible to change the level per directory:
-
- LogLevel info
- <Directory /usr/local/apache/htdocs/app>
- LogLevel debug
- </Files>
-
+
+LogLevel info
+<Directory "/usr/local/apache/htdocs/app">
+ LogLevel debug
+</Directory>
+
Per directory loglevel configuration only affects messages that are
@@ -2963,9 +2923,9 @@ connection
For example:
-
- MaxKeepAliveRequests 500
-
+
+MaxKeepAliveRequests 500
+
@@ -3288,10 +3248,10 @@ or specified mutexes
/var/httpd/locks
. The mutex mechanism for all other mutexes
will be changed from the compiled-in default to sysvsem
.
-
- Mutex sysvsem default
- Mutex fcntl:/var/httpd/locks mpm-accept
-
+
+Mutex sysvsem default
+Mutex fcntl:/var/httpd/locks mpm-accept
+
@@ -3439,38 +3399,30 @@ directory
For example, without any +
and -
symbols:
-
- <Directory /web/docs>
-
- Options Indexes FollowSymLinks
-
- </Directory>
-
- <Directory /web/docs/spec>
-
- Options Includes
-
- </Directory>
-
+
+<Directory "/web/docs">
+ Options Indexes FollowSymLinks
+</Directory>
+
+<Directory "/web/docs/spec">
+ Options Includes
+</Directory>
+
then only Includes
will be set for the
/web/docs/spec
directory. However if the second
Options directive uses the +
and
-
symbols:
-
- <Directory /web/docs>
-
- Options Indexes FollowSymLinks
-
- </Directory>
-
- <Directory /web/docs/spec>
-
- Options +Includes -Indexes
-
- </Directory>
-
+
+<Directory "/web/docs">
+ Options Indexes FollowSymLinks
+</Directory>
+
+<Directory "/web/docs/spec">
+ Options +Includes -Indexes
+</Directory>
+
then the options FollowSymLinks
and
Includes
are set for the /web/docs/spec
@@ -3505,9 +3457,9 @@ On Windows from Apache 2.3.3 and later.
For example, if you are running https
on a non-standard port, specify the protocol explicitly:
-
- Protocol https
-
+
+Protocol https
+
You can also specify the protocol using the Listen directive.
@@ -3643,15 +3595,15 @@ later
by the shebang line (first line, starting with #!
) in the
script. On Win32 systems this line usually looks like:
-
- #!C:/Perl/bin/perl.exe
-
+
+#!C:/Perl/bin/perl.exe
+
or, if perl
is in the PATH
, simply:
-
- #!perl
-
+
+#!perl
+
Setting ScriptInterpreterSource Registry
will
cause the Windows Registry tree HKEY_CLASSES_ROOT
to be
@@ -3747,9 +3699,9 @@ messages sent to the client
It may be worth setting up a dedicated address for this, e.g.
-
- ServerAdmin www-admin@foo.example.com
-
+
+ServerAdmin www-admin@foo.example.com
+
as users do not always mention that they are talking about the
server!
@@ -3768,15 +3720,15 @@ to name-virtual hosts
href="../vhosts/name-based.html">name-based virtual hosts. The
ServerAlias may include wildcards, if appropriate.
-
- <VirtualHost *:80>
- ServerName server.example.com
- ServerAlias server server2.example.com server2
- ServerAlias *.example.com
- UseCanonicalName Off
- # ...
- </VirtualHost>
-
+
+<VirtualHost *:80>
+ServerName server.example.com
+ServerAlias server server2.example.com server2
+ServerAlias *.example.com
+UseCanonicalName Off
+# ...
+</VirtualHost>
+
Name-based virtual hosts for the best-matching set of virtualhosts are processsed
@@ -3814,9 +3766,9 @@ itself
and you wish the web server to be so identified, the following
directive should be used:
-
- ServerName www.example.com
-
+
+ServerName www.example.com
+
The ServerName directive
may appear anywhere within the definition of a server. However,
@@ -3908,9 +3860,9 @@ is accessed by an incompatible browser
module="mod_so">LoadModule, for example) are taken as
relative to this directory.
- Example
- ServerRoot /home/httpd
-
+ Example
+ServerRoot "/home/httpd"
+
The default location of ServerRoot may be
modified by using the --prefix
argument to
@@ -4050,22 +4002,20 @@ handler
of extension, you might put the following into an
.htaccess
file in that directory:
-
- SetHandler imap-file
-
+
+SetHandler imap-file
+
Another example: if you wanted to have the server display a
status report whenever a URL of
http://servername/status
was called, you might put
the following into httpd.conf
:
-
- <Location /status>
-
- SetHandler server-status
-
- </Location>
-
+
+<Location "/status">
+ SetHandler server-status
+</Location>
+
You can override an earlier defined SetHandler
directive by using the value None
.
@@ -4127,13 +4077,11 @@ server
in the /www/data/
directory for server-side
includes.
-
- <Directory /www/data/>
-
- SetOutputFilter INCLUDES
-
- </Directory>
-
+
+<Directory "/www/data/">
+ SetOutputFilter INCLUDES
+</Directory>
+
If more than one filter is specified, they must be separated
by semicolons in the order in which they should process the
@@ -4374,34 +4322,30 @@ hostname or IP address
- Example
- <VirtualHost 10.1.2.3:80>
-
- ServerAdmin webmaster@host.example.com
- DocumentRoot /www/docs/host.example.com
- ServerName host.example.com
- ErrorLog logs/host.example.com-error_log
- TransferLog logs/host.example.com-access_log
-
- </VirtualHost>
-
+ Example
+<VirtualHost 10.1.2.3:80>
+ ServerAdmin webmaster@host.example.com
+ DocumentRoot /www/docs/host.example.com
+ ServerName host.example.com
+ ErrorLog logs/host.example.com-error_log
+ TransferLog logs/host.example.com-access_log
+</VirtualHost>
+
IPv6 addresses must be specified in square brackets because
the optional port number could not be determined otherwise. An
IPv6 example is shown below:
-
- <VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
-
- ServerAdmin webmaster@host.example.com
- DocumentRoot /www/docs/host.example.com
- ServerName host.example.com
- ErrorLog logs/host.example.com-error_log
- TransferLog logs/host.example.com-access_log
-
- </VirtualHost>
-
+
+<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80>
+ ServerAdmin webmaster@host.example.com
+ DocumentRoot /www/docs/host.example.com
+ ServerName host.example.com
+ ErrorLog logs/host.example.com-error_log
+ TransferLog logs/host.example.com-access_log
+</VirtualHost>
+
Each Virtual Host must correspond to a different IP address,
different port number or a different host name for the server,
--
2.40.0