From 313986a96ed5f2afe01a49429f4499d4b3f2cd8d Mon Sep 17 00:00:00 2001
From: Joe Orton Typically the module will be configured as so; This module implements HTTP Digest Authentication
- (RFC 2617), and
- provides an alternative to CacheRoot "/var/cache/apache/"
+
+ print(f"{key} --> {value}<br>")
diff --git a/docs/manual/mod/allmodules.xml b/docs/manual/mod/allmodules.xml
index d2c35728fb..1955532018 100644
--- a/docs/manual/mod/allmodules.xml
+++ b/docs/manual/mod/allmodules.xml
@@ -80,8 +80,8 @@
CacheRoot "/var/cache/apache"
CacheEnable disk /
CacheDirLevels 2
CacheDirLength 1
diff --git a/docs/manual/howto/cgi.html.en.utf8 b/docs/manual/howto/cgi.html.en.utf8
index 7ab4be8524..36464fd444 100644
--- a/docs/manual/howto/cgi.html.en.utf8
+++ b/docs/manual/howto/cgi.html.en.utf8
@@ -486,7 +486,7 @@ import os
print("Content-type: text/html\n")
for key, value in os.environ.items():
-print(f"{key} --> {value}<br>")Summary
mod_auth_basic where the
- password is not transmitted as cleartext. However, this does
- not lead to a significant security advantage over
- basic authentication. On the other hand, the password storage on the
- server is much less secure with digest authentication than with
- basic authentication. Therefore, using basic auth and encrypting the
- whole connection using mod_ssl is a much better
- alternative.mod_auth_basic in which the password is not sent
+ over the network in cleartext.
Basic and Digest are both authentication schemes only: they
+ establish who the client is, and do nothing for the confidentiality or
+ integrity of the request and response themselves. Over an unencrypted
+ connection the contents of every request and response are exposed with
+ either scheme; Digest's one advantage is that the password is not among
+ them. Digest is therefore not a substitute for a connection secured
+ with mod_ssl, which protects the credentials and the
+ data alike, and that one advantage has limits of its own (see the note
+ below).
Digest authentication was intended to be more secure than basic
- authentication, but no longer fulfills that design goal. A
- man-in-the-middle attacker can trivially force the browser to downgrade
- to basic authentication. And even a passive eavesdropper can brute-force
- the password using today's graphics hardware, because the hashing
- algorithm used by digest authentication is too fast. Another problem is
- that the storage of the passwords on the server is insecure. The contents
- of a stolen htdigest file can be used directly for digest authentication.
- Therefore using mod_ssl to encrypt the whole connection is
- strongly recommended.
mod_auth_digest only works properly on platforms
- where APR supports shared memory.
Digest authentication's one advantage over Basic, keeping the
+ password off the wire, is conditional. If the client will silently fall
+ back to Basic when challenged, an active attacker can
+ strip the Digest challenge and offer Basic instead, and the browser
+ then sends the password in cleartext; a passive eavesdropper can mount
+ an offline brute-force attack on a captured response, which the fast
+ MD5 hash does little to slow; and if the htdigest
+ file is stolen its stored hashes can be replayed to authenticate to
+ that realm directly, without the password itself being recovered.
+ Encrypt the whole connection with mod_ssl instead.
mod_auth_digest requires an APR built with shared
+ memory support, and is not built without it.
| Description: | Selects the algorithm used to calculate the challenge and -response hashes in digest authentication |
|---|---|
| Syntax: | AuthDigestAlgorithm MD5|MD5-sess |
| Syntax: | AuthDigestAlgorithm MD5 |
| Default: | AuthDigestAlgorithm MD5 |
| Context: | directory, .htaccess |
| Override: | AuthConfig |
The AuthDigestAlgorithm directive
selects the algorithm used to calculate the challenge and response
- hashes.
MD5-sess is not correctly implemented yet.
- MD5 is supported.
| Description: | URIs that are in the same protection space for digest + |
|---|---|
| Description: | URIs that are in the same protection space for Digest authentication |
| Syntax: | AuthDigestDomain URI [URI] ... |
| Context: | directory, .htaccess |
| Module: | mod_auth_digest |
The AuthDigestNonceLifetime directive
- controls how long the server nonce is valid. When the client
- contacts the server using an expired nonce the server will send
- back a 401 with stale=true. If seconds is
- greater than 0 then it specifies the amount of time for which the
- nonce is valid; this should probably never be set to less than 10
- seconds. If seconds is less than 0 then the nonce never
- expires.
-
stale=true, and an RFC-compliant client retries with a
+ fresh nonce without prompting the user.
+
+ Authentication-Info header of each response so the
+ client can continue; a client which reuses a nonce is answered with
+ stale=true and retries. One-time nonces give stronger
+ protection against replaying a captured request, but the client
+ cannot pipeline requests, and one that does receives a 401 for all
+ but the first and has to resend them. The protection is worth this
+ cost mainly for requests that change server state or return content
+ which varies over time; replaying a request for unchanging content
+ that the eavesdropper already captured in full gains nothing.| Description: | Determines the quality-of-protection to use in digest + |
|---|---|
| Description: | Determines the quality-of-protection to use in Digest authentication |
| Syntax: | AuthDigestQop none|auth|auth-int [auth|auth-int] |
| Syntax: | AuthDigestQop auth |
| Default: | AuthDigestQop auth |
| Context: | directory, .htaccess |
| Override: | AuthConfig |
| Status: | Extension |
| Module: | mod_auth_digest |
The AuthDigestQop directive determines
- the quality-of-protection to use. auth will
- only do authentication (username/password); auth-int is
- authentication plus integrity checking (an MD5 hash of the entity
- is also computed and checked); none will cause the module
- to use the old RFC-2069 digest algorithm (which does not include
- integrity checking). Both auth and auth-int may
- be specified, in which the case the browser will choose which of
- these to use. none should only be used if the browser for
- some reason does not like the challenge it receives otherwise.
The AuthDigestQop directive determines the
+ quality-of-protection to use. Only auth
+ (authentication) is supported, and it is the default, so this
+ directive no longer has any effect and is retained only for
+ compatibility.
auth-int is not implemented yet.
- none (the RFC 2069
+ Digest scheme, without a quality-of-protection). It has been removed:
+ a request whose qop is missing or not auth
+ is now rejected.AuthDigestShmemSize sizeAuthDigestShmemSize 1000AuthDigestShmemSize 81920 and read the error message after trying to start the
server.
+ The default holds roughly 140 clients. A client which is discarded
+ to make room for another is not denied access: it is issued a new
+ nonce with stale=true, which costs it one extra request.
+ Note that a request which does not authenticate also takes an entry,
+ since the challenge sent back to it carries the identifier the client
+ is tracked by.
The size is normally expressed in Bytes, but you
may follow the number with a K or an M to
express your value as KBytes or MBytes. For example, the following
diff --git a/docs/manual/mod/mod_dav_lock.html b/docs/manual/mod/mod_dav_lock.html
deleted file mode 100644
index 9d77616fe7..0000000000
--- a/docs/manual/mod/mod_dav_lock.html
+++ /dev/null
@@ -1,13 +0,0 @@
-# GENERATED FROM XML -- DO NOT EDIT
-
-URI: mod_dav_lock.html.en.utf8
-Content-Language: en
-Content-type: text/html; charset=UTF-8
-
-URI: mod_dav_lock.html.fr.utf8
-Content-Language: fr
-Content-type: text/html; charset=UTF-8
-
-URI: mod_dav_lock.html.ja.utf8
-Content-Language: ja
-Content-type: text/html; charset=UTF-8
diff --git a/docs/manual/mod/mod_dav_lock.html.en.utf8 b/docs/manual/mod/mod_dav_lock.html.en.utf8
deleted file mode 100644
index fd8da4dcb1..0000000000
--- a/docs/manual/mod/mod_dav_lock.html.en.utf8
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
Apache HTTP Server Version 2.5
-
| Description: | Generic locking module for mod_dav |
|---|---|
| Status: | Extension |
| Module Identifier: | dav_lock_module |
| Source File: | mod_dav_lock.c |
This module implements a generic locking API which can be used by any
- backend provider of mod_dav. It requires at least
- the service of mod_dav. But without a backend provider
- which makes use of it, it's useless and should not be loaded into the
- server. A sample backend module which actually utilizes
- mod_dav_lock is mod_dav_svn, the subversion provider module.
Note that mod_dav_fs does not need this
- generic locking module, because it uses its own more specialized
- version.
In order to make mod_dav_lock functional, you just have
- to specify the location of the lock database using the DavGenericLockDB directive described
- below.
In order to retrieve the pointer to the locking provider function, you
- have to use the ap_lookup_provider API with the arguments
- dav-lock, generic, and 0.
| Description: | Location of the DAV lock database |
|---|---|
| Syntax: | DavGenericLockDB file-path |
| Context: | server config, virtual host, directory |
| Status: | Extension |
| Module: | mod_dav_lock |
Use the DavGenericLockDB directive to specify
- the full path to the lock database, excluding an extension. If
- the path is not absolute, it will be interpreted relative to ServerRoot. The implementation of
- mod_dav_lock uses a SDBM database to track user
- locks.
DavGenericLockDB var/DavLock-
The directory containing the lock database file must be
- writable by the User
- and Group under which
- Apache is running. For security reasons, you should create a
- directory for this purpose rather than changing the permissions on
- an existing directory. In the above example, Apache will create
- files in the var/ directory under the ServerRoot with the base filename
- DavLock and an extension added by the server.
Serveur HTTP Apache Version 2.5
-
| Description: | Module de verrouillage générique pour
-mod_dav |
|---|---|
| Statut: | Extension |
| Identificateur de Module: | dav_lock_module |
| Fichier Source: | mod_dav_lock.c |
ce module implémente une API de verrouillage générique que tout
- fournisseur support de mod_dav peut utiliser. Son
- activation nécessite l'utilisation de mod_dav. Mais
- sans fournisseur support pour l'utiliser, il n'est d'aucun service
- et ne doit pas être chargé dans le serveur. mod_dav_svn, le module qui
- implémente le fournisseur subversion, est un exemple
- de module de support qui utilise effectivement
- mod_dav_lock.
Notez que mod_dav_fs n'a pas besoin de
- ce module de verrouillage générique, car il utilise sa propre
- version plus spécifique.
Pour que mod_dav_lock puisse fonctionner, il
- vous suffit de spécifier le chemin de la base de données des verrous
- à l'aide de la directive DavGenericLockDB décrite
- ci-dessous.
Pour déterminer le pointeur de la fonction du fournisseur de
- verrouillage, vous devez utiliser l'API
- ap_lookup_provider avec les arguments
- dav-lock, generic et 0.
| Description: | Chemin de la base de données des verrous DAV |
|---|---|
| Syntaxe: | DavGenericLockDB chemin fichier |
| Contexte: | configuration globale, serveur virtuel, répertoire |
| Statut: | Extension |
| Module: | mod_dav_lock |
La directive DavLockDB spécifie
- le chemin complet de la base de données des verrous, sans extension.
- Si le chemin n'est pas absolu, il sera considéré comme relatif au
- répertoire défini par la directive ServerRoot. L'implémentation de
- mod_dav_lock utilise une base de données SDBM pour
- surveiller les verrous utilisateurs.
DavGenericLockDB var/DavLock-
Les utilisateur et groupe sous lesquels Apache s'exécute et qui
- sont respectivement définis par les directives User et Group doivent pouvoir écrire dans le
- répertoire qui contient le fichier de la base de données des
- verrous. Pour des raisons de sécurité, il est recommandé de créer un
- répertoire dédié à la base de données des verrous, plutôt que de
- modifier les permissions d'un répertoire existant. Dans l'exemple
- ci-dessus, Apache va créer des fichiers dans le répertoire
- var/, lui-même sous-répertoire du répertoire défini par
- la directive ServerRoot, avec le nom de base
- DavLock suivi d'une extension choisie par le
- serveur.
Apache HTTP サーバ バージョン 2.5
-
| 説明: | mod_dav 用の汎用ロックモジュール |
|---|---|
| ステータス: | Extension |
| モジュール識別子: | dav_lock_module |
| ソースファイル: | mod_dav_lock.c |
このモジュールは mod_dav のどのバックエンド
- からでも使える汎用ロック API を提供します。
- 使用には最低限 mod_dav
- を必要としますが、これを利用するバックエンドが存在しないと役に立たないので、
- そのような場合はサーバに読み込むべきではありません。
- mod_dav_lock
- を実際に利用するバックエンドモジュールの例としては subversion
- プロバイダモジュールの mod_dav_svn があります。
mod_dav_fs は特化された専用のバージョンを
- 使うため、この汎用モジュールは必要ないことに注意して
- ください。
mod_dav_lock を機能させるには、
- 以下で説明されている DavGenericLockDB を使って
- ロックデータベースの場所を指定するだけです。
ロックを提供している関数へのポインタを取得するためには、
- ap_lookup_provider API を、引数 dav-lock,
- generic, 0 を指定して使う必要が
- あります。
| 説明: | DAV ロックデータベースの場所 |
|---|---|
| 構文: | DavGenericLockDB file-path |
| コンテキスト: | サーバ設定ファイル, バーチャルホスト, ディレクトリ |
| ステータス: | Extension |
| モジュール: | mod_dav_lock |
DavGenericLockDB ディレクティブを
- 使って、拡張子を除いたロックデータベースへのフルパスを
- 指定します。絶対パスでないときは ServerRoot からの相対パスとして
- 扱われます。mod_dav_lock の実装ではユーザの
- ロックを追跡するのに SDBM データベースを使います。
DavGenericLockDB var/DavLock-
ロックデータベースファイルのあるディレクトリは
- Apache が実行されている User
- と Group によって
- 書き込み可能でなければなりません。セキュリティ上の理由から、
- 既存のディレクトリのパーミッションを変更するのではなく、
- 専用のディレクトリを作るのが良いでしょう。上の例では、
- Apache は ServerRoot の下の var/
- ディレクトリに、ファイル名の本体が DavLock で
- サーバが追加する拡張子を持つファイルを作成します。
Apache HTTP Server Version 2.5
+
Available Languages: en
+| Description: | Determines the MIME type of a file from its contents + using libmagic |
|---|---|
| Status: | Extension |
| Module Identifier: | mime_libmagic_module |
| Source File: | mod_mime_libmagic.c |
| Compatibility: | Available in Apache 2.5.1 and later |
This module determines the MIME
+ type of a file by examining its contents, in the same
+ way the file(1) command does. It is intended as a
+ "second line of defense" for files which
+ mod_mime cannot type from their extension: it
+ runs after mod_mime and does nothing if a type
+ has already been set.
Unlike mod_mime_magic, which has its own
+ copy of the file(1) engine and its own magic
+ database, this module uses the system's libmagic(3)
+ library and magic database from the file package,
+ so the types it reports are those which file --mime-type
+ would report. The module is built only if libmagic is found at
+ configure time, and is only active in a server or virtual host
+ where MimeLibmagic
+ is On.
Where libmagic reports application/octet-stream
+ the module sets no type, leaving the response without a
+ Content-Type header, as mod_mime_magic
+ does for unrecognised content. Directories are typed as
+ httpd/unix-directory and empty files as
+ text/plain.
The module does not look inside compressed files and never
+ sets a Content-Encoding: a gzip file is reported as
+ application/gzip. This differs from
+ mod_mime_magic, which reports the compressed
+ file's encoding.
A libmagic handle is created, loaded with the magic database
+ and destroyed for every request examined. Loading a compiled database
+ (magic.mgc) maps the file into memory rather than
+ parsing it, and the mapped pages are shared between all server
+ processes, so this is inexpensive. If the configured database
+ is a text file rather than a compiled one, it is parsed on every
+ request.
Only the first MimeLibmagicBytes bytes of a file are read and
+ examined, whatever its size.
Examining text content in particular can allocate a few + megabytes of memory temporarily. With a threaded MPM and a C + library which keeps a separate heap per thread, each server + thread retains its peak allocation, so the resident size of a + busy child process can grow by that much per thread before + levelling off. This is not a leak.
+| Description: | Enable MIME type determination from file contents |
|---|---|
| Syntax: | MimeLibmagic On|Off |
| Default: | MimeLibmagic Off |
| Context: | server config, virtual host |
| Status: | Extension |
| Module: | mod_mime_libmagic |
The MimeLibmagic directive enables the
+ module for a server or virtual host. Files which
+ mod_mime leaves untyped, typically those without
+ a recognised extension, then have their contents examined by
+ libmagic.
MimeLibmagic On+
| Description: | Number of bytes of a file examined |
|---|---|
| Syntax: | MimeLibmagicBytes bytes |
| Default: | MimeLibmagicBytes 16384 |
| Context: | server config, virtual host |
| Status: | Extension |
| Module: | mod_mime_libmagic |
The MimeLibmagicBytes directive sets
+ how many bytes from the start of a file are read and examined.
+ Larger values allow magic rules which look deeper into a file to
+ match, at the cost of reading more of every examined file. The
+ maximum is 1048576.
| Description: | Add a charset parameter to text types |
|---|---|
| Syntax: | MimeLibmagicCharset On|Off |
| Default: | MimeLibmagicCharset Off |
| Context: | server config, virtual host |
| Status: | Extension |
| Module: | mod_mime_libmagic |
When MimeLibmagicCharset is
+ On, the character encoding libmagic detects (such
+ as us-ascii, utf-8 or
+ iso-8859-1) is added as a charset
+ parameter to text/* types, giving for example
+ text/plain; charset=utf-8. Other types are not
+ affected. As with AddDefaultCharset, the detected charset should be
+ trusted only where the content is known to be encoded
+ consistently.
| Description: | The magic database to use |
|---|---|
| Syntax: | MimeLibmagicFile file-path |
| Default: | The default database of the installed libmagic |
| Context: | server config, virtual host |
| Status: | Extension |
| Module: | mod_mime_libmagic |
The MimeLibmagicFile directive names
+ the magic database, in place of the default compiled into
+ libmagic (typically /usr/share/misc/magic, for which
+ the compiled magic.mgc alongside it is loaded).
+ The database must be in the format described in
+ magic(5); the file distributed with
+ mod_mime_magic is not suitable. A relative path
+ is taken relative to the ServerRoot. If the database cannot be loaded, an
+ error is logged for each request examined and the file is left
+ untyped.
Note that the MAGIC environment variable, if set
+ when the server is started, overrides the library default, but
+ not a database given with this directive.
MimeLibmagicFile /usr/share/misc/magic.mgc+
Available Languages: en
+Directives placed in <Proxy>
- sections apply only to matching proxied content using a simple string prefix match against the URL. Shell-style wildcards are also
- allowed.
For example, the following will allow only hosts in
yournetwork.example.com to access content via your proxy
@@ -774,6 +775,14 @@ NoProxy .example.com 192.168.112.0/21
</Proxy>
+
A backend URL matches the configuration section if it begins with the
the wildcard-url string, even if the last path segment in the
@@ -1098,6 +1107,14 @@ proxied resources
identical to the <Proxy> directive, except that it matches URLs
using regular expressions.
From 2.4.8 onwards, named groups and backreferences are captured and
written to the environment with the corresponding name prefixed with
"MATCH_" and in upper case. This allows elements of URLs to be referenced
diff --git a/docs/manual/mod/mod_proxy_connect.html.en.utf8 b/docs/manual/mod/mod_proxy_connect.html.en.utf8
index 72f3fb4301..89f90b080a 100644
--- a/docs/manual/mod/mod_proxy_connect.html.en.utf8
+++ b/docs/manual/mod/mod_proxy_connect.html.en.utf8
@@ -116,8 +116,16 @@ Port ranges available since Apache 2.3.7.
AllowCONNECT directive to override this default and
allow connections to the listed ports only.
Set the value to None to disallow
- CONNECT requests to all ports, including the defaults.
Set the value to None to disallow CONNECT
+ requests to all ports, including the defaults. None cannot
+ be combined with port numbers in the same context.
Where AllowCONNECT is set in both the main
+ server and a virtual host, the lists of ports are merged, so a virtual
+ host may permit additional ports. A value of None takes
+ precedence and disallows all ports where it is set; but an inherited
+ None is in turn overridden by an explicit list of ports in a
+ virtual host.
This module provides support for systemd integration. It allows
httpd to be used in a service with the systemd
- Type=notify (see systemd.service(5)
+ Type=notify or Type=notify-reload (see systemd.service(5)
for more information). The module is activated if loaded.
[Unit] @@ -68,12 +68,79 @@ WantedBy=multi-user.target
This module does not provide support for Systemd socket activation.
+A service manager from systemd 253 onwards offers
+ Type=notify-reload, which is worth using in preference.
+ Under Type=notify a systemctl reload
+ returns as soon as the ExecReload command has sent its
+ signal, which is before the new configuration has been read, and it
+ reports success whatever becomes of the restart afterwards.
+ Type=notify-reload instead holds the reload open until
+ the server reports it finished, so the command waits for the new
+ configuration to be in use and fails if it never is. mod_systemd
+ sends the RELOADING=1 notification the protocol expects
+ while the configuration is being read, stamped with the
+ MONOTONIC_USEC the service manager requires, and
+ READY=1 once it has been loaded.
[Service] +Type=notify-reload +ReloadSignal=SIGCONT +ExecStart=/usr/local/apache2/bin/httpd -D FOREGROUND -k start +ExecReload=/usr/local/apache2/bin/httpd -k graceful +KillMode=mixed
The service manager runs ExecReload first, and sends
+ the signal named by ReloadSignal only once that command
+ has exited successfully. Keeping ExecReload is what
+ makes the reload safe: httpd -k graceful parses the new
+ configuration in a process of its own and exits without signalling
+ anything if it does not parse, so the reload fails and the running
+ server carries on with the configuration it already has. Leaving
+ ExecReload out, and letting the service manager signal
+ the server directly, gives up that check: the running parent reads
+ the new configuration itself, and a configuration which does not
+ parse makes it exit, taking the server down.
The signal sent after ExecReload has run is then
+ redundant, so ReloadSignal should name one httpd does
+ not act on, such as SIGCONT. It matters that it is set:
+ the default is SIGHUP, which httpd takes as an
+ ungraceful restart, dropping the connections a reload is
+ meant to preserve. A unit which does leave out
+ ExecReload must set ReloadSignal=SIGUSR1,
+ the signal httpd restarts gracefully on.
Systemd socket activation is supported if httpd was built with
+ it. Each Listen port
+ must then be one passed in by systemd; a port which was not is a
+ fatal configuration error rather than one httpd opens for itself.
+ Socket activation is used only if this module is loaded, so it can
+ be built in and left unused.
ExtendedStatus is
enabled by default if the module is loaded. If ExtendedStatus is not disabled in
the configuration, run-time load and request statistics are made
available in the systemctl status output.
The systemd watchdog is supported. If the service unit sets
+ WatchdogSec=, the parent process sends the keep-alive
+ notification which tells systemd the server is still alive; a server
+ which stops sending it is terminated and, with a suitable
+ Restart= setting, restarted. The notification is sent
+ while the configuration is being read and again once it is loaded, so
+ that a reload is covered, and periodically from the parent process
+ while the server runs.
That periodic notification is sent about every ten seconds, which
+ is how often the parent process runs the hook it is sent from. A
+ WatchdogSec= of less than twice that cannot be met, and
+ would have systemd terminating a server which is working normally;
+ such a setting is reported as a warning at startup. Use a
+ WatchdogSec= of at least 20 seconds.
[Service] +WatchdogSec=30 +Restart=on-failure
This module provides no diff --git a/docs/manual/mod/overrides.html.en.utf8 b/docs/manual/mod/overrides.html.en.utf8 index 6f911f725b..0691927d16 100644 --- a/docs/manual/mod/overrides.html.en.utf8 +++ b/docs/manual/mod/overrides.html.en.utf8 @@ -278,9 +278,9 @@ store passwords passwords for authentication
Require directly:
<Location "/"> - Require all granted - Require not ip 193.102.180.41 - Require not ip 192.76.162.40 + <RequireAll> + Require all granted + Require not ip 193.102.180.41 + Require not ip 192.76.162.40 + </RequireAll> </Location>