diff --git a/doc/configuration.txt b/doc/configuration.txt index c2ad7f9ee..d2d7e2cfe 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -52,21 +52,11 @@ Summary 2.9.3. Protocol prefixes 2.10. Examples -3. Global parameters +3. Global section 3.1. Process management and security 3.2. Performance tuning 3.3. Debugging -3.3.1. Traces -3.4. Userlists -3.5. Mailers -3.6. Programs (deprecated) -3.7. HTTP-errors -3.8. Rings -3.9. Log forwarding -3.10. HTTPClient tuning -3.11. Certificate Storage -3.11.1. Load options -3.12. ACME +3.4. HTTPClient tuning 4. Proxies 4.1. Proxy keywords matrix @@ -149,6 +139,18 @@ Summary 11.1. Stick-tables declaration 11.2. Peers declaration +12. Other sections +12.1. Traces +12.2. Userlists +12.3. Mailers +12.4. HTTP-errors +12.5. Rings +12.6. Log forwarding +12.7. Certificate Storage +12.7.1. Load options +12.8. ACME +12.9. Programs (deprecated) + 1. Quick reminder about HTTP ---------------------------- @@ -938,7 +940,7 @@ existing variables, not empty ones. user "$HAPROXY_USER" Some variables are defined by HAProxy, they can be used in the configuration -file, or could be inherited by a program (See 3.6. Programs). These variables +file, or could be inherited by a program (See 12.9. Programs). These variables are listed in the matrix below, and they are classified among four categories: * usable: the variable is accessible from the configuration, either to be @@ -953,7 +955,7 @@ are listed in the matrix below, and they are classified among four categories: described in section 9.3 "Unix Sockets commands" of the management guide. * exported: variable is exported to launch programs in a modified environment - (See section 3.6 "Programs"). Note that this does not apply to external + (See section 12.9 "Programs"). Note that this does not apply to external checks which have their own rules regarding exported variables. There also two subcategories "master" and "worker", respectively marked 'M' and @@ -5197,518 +5199,8 @@ zero-warning report errors in such a case. This option is equivalent to command line argument "-dW". -3.3.1. Traces -------------- - -For debugging purpose, it is possible to activate traces on an HAProxy's -subsystem. This will dump debug messages about a specific subsystem. It is a -very powerful tool to diagnose issues. Traces can be dynamically configured via -the CLI. It is also possible to predefined some settings in the configuration -file, in dedicated "traces" sections. More details about traces can be found in -the management guide. It remains a developer tools used during complex -debugging sessions. It is pretty verbose and have a cost, so use it with -caution. And because it is a developer tool, there is no warranty about the -backward compatibility of this section. - -traces - Starts a new traces section. One or multiple "traces" section may be - used. All direcitives are evaluated in the declararion order, the last ones - overriding previous ones. - -trace - Configures on "trace" subsystem. Each of them can be found in the management - manual, and follow the exact same syntax. Any output that the "trace" - command would produce will be emitted during the parsing step of the - section. Most of the time these will be errors and warnings, but certain - incomplete commands might list permissible choices. This command is not meant - for regular use, it will generally only be suggested by developers along - complex debugging sessions. It is important to keep in mind that depending on - the trace level and details, enabling traces can severely degrade the global - performance. Please refer to the management manual for the statements syntax. - - Example: - ring buf1 - size 10485760 # 10MB - format timed - backing-file /tmp/h1.traces - - ring buf2 - size 10485760 # 10MB - format timed - backing-file /tmp/h2.traces - - traces - trace h1 sink buf1 level developer verbosity complete start now - trace h2 sink buf1 level developer verbosity complete start now - -3.4. Userlists --------------- -It is possible to control access to frontend/backend/listen sections or to -http stats by allowing only authenticated and authorized users. To do this, -it is required to create at least one userlist and to define users. - -userlist - Creates new userlist with name . Many independent userlists can be - used to store authentication & authorization data for independent customers. - -group [users ,,(...)] - Adds group to the current userlist. It is also possible to - attach users to this group by using a comma separated list of names - proceeded by "users" keyword. - -user [password|insecure-password ] - [groups ,,(...)] - Adds user to the current userlist. Both secure (encrypted) and - insecure (unencrypted) passwords can be used. Encrypted passwords are - evaluated using the crypt(3) function, so depending on the system's - capabilities, different algorithms are supported. For example, modern Glibc - based Linux systems support MD5, SHA-256, SHA-512, and, of course, the - classic DES-based method of encrypting passwords. - - Attention: Be aware that using encrypted passwords might cause significantly - increased CPU usage, depending on the number of requests, and the algorithm - used. For any of the hashed variants, the password for each request must - be processed through the chosen algorithm, before it can be compared to the - value specified in the config file. Most current algorithms are deliberately - designed to be expensive to compute to achieve resistance against brute - force attacks. They do not simply salt/hash the clear text password once, - but thousands of times. This can quickly become a major factor in HAProxy's - overall CPU consumption, and can even lead to application crashes! - - To address the high CPU usage of hash functions, one approach is to reduce - the number of rounds of the hash function (SHA family algorithms) or decrease - the "cost" of the function, if the algorithm supports it. - - As a side note, musl (e.g. Alpine Linux) implementations are known to be - slower than their glibc counterparts when calculating hashes, so you might - want to consider this aspect too. - - Example: - userlist L1 - group G1 users tiger,scott - group G2 users xdb,scott - - user tiger password $6$k6y3o.eP$JlKBx9za9667qe4(...)xHSwRv6J.C0/D7cV91 - user scott insecure-password elgato - user xdb insecure-password hello - - userlist L2 - group G1 - group G2 - - user tiger password $6$k6y3o.eP$JlKBx(...)xHSwRv6J.C0/D7cV91 groups G1 - user scott insecure-password elgato groups G1,G2 - user xdb insecure-password hello groups G2 - - Please note that both lists are functionally identical. - - -3.5. Mailers ------------- -It is possible to send email alerts when the state of servers changes. -If configured email alerts are sent to each mailer that is configured -in a mailers section. Email is sent to mailers through Lua (see -examples/lua/mailers.lua). - -mailers - Creates a new mailer list with the name . It is an - independent section which is referenced by one or more proxies. - -mailer : - Defines a mailer inside a mailers section. - - Example: - global - # mailers.lua file as provided in the git repository - # adjust path as needed - lua-load examples/lua/mailers.lua - - mailers mymailers - mailer smtp1 192.168.0.1:587 - mailer smtp2 192.168.0.2:587 - - backend mybackend - mode tcp - balance roundrobin - - email-alert mailers mymailers - email-alert from test1@horms.org - email-alert to test2@horms.org - - server srv1 192.168.0.30:80 - server srv2 192.168.0.31:80 - -timeout mail