|
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | 4 | <meta charset="utf-8" /> |
5 | | - <title>HAProxy version 2.4.28-1 - Configuration Manual</title> |
| 5 | + <title>HAProxy version 2.4.28-65 - Configuration Manual</title> |
6 | 6 | <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> |
7 | 7 | <link href="https://raw.githubusercontent.com/thomaspark/bootswatch/v3.3.7/cerulean/bootstrap.min.css" rel="stylesheet" /> |
8 | 8 | <link href="../css/page.css?0.4.2-15" rel="stylesheet" /> |
|
3757 | 3757 | You can use <strong>left</strong> and <strong>right</strong> arrow keys to navigate between chapters.<br> |
3758 | 3758 | </p> |
3759 | 3759 | <p class="text-right"> |
3760 | | - <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2024/11/08</b></small> |
| 3760 | + <small>Converted with <a href="https://github.com/cbonte/haproxy-dconv">haproxy-dconv</a> v<b>0.4.2-15</b> on <b>2025/04/17</b></small> |
3761 | 3761 | </p> |
3762 | 3762 | </div> |
3763 | 3763 | <!-- /.sidebar --> |
|
3768 | 3768 | <div class="text-center"> |
3769 | 3769 | <h1><a href="http://www.haproxy.org/" title="HAProxy"><img src="../img/HAProxyCommunityEdition_60px.png?0.4.2-15" /></a></h1> |
3770 | 3770 | <h2>Configuration Manual</h2> |
3771 | | - <p><strong>version 2.4.28-1</strong></p> |
| 3771 | + <p><strong>version 2.4.28-65</strong></p> |
3772 | 3772 | <p> |
3773 | 3773 | 2024/11/08<br> |
3774 | 3774 |
|
@@ -5434,6 +5434,57 @@ <h2 id="chapter-2.4" data-target="2.4"><small><a class="small" href="#2.4">2.4.< |
5434 | 5434 | - a non-nul integer (e.g. '1'), always returns "true". |
5435 | 5435 | - a predicate optionally followed by argument(s) in parenthesis. |
5436 | 5436 |
|
| 5437 | +The same line tokenizer and argument parser are used as for the rest of the |
| 5438 | +configuration language. Words are split around consecutive series of one or |
| 5439 | +more unquoted spaces or tabs, and are reassembled together using a single space |
| 5440 | +to delimit them before evaluation, in order to save the user from having to |
| 5441 | +quote the entire line. But this also means that spaces surrounding commas or |
| 5442 | +parenthesis are definitely part of the value, which is not always expected. |
| 5443 | +For example, the expression below: |
| 5444 | + |
| 5445 | + .if defined( HAPROXY_MWORKER ) |
| 5446 | + |
| 5447 | +will test for the existence of variable " HAPROXY_MWORKER " (with spaces), |
| 5448 | +and this one: |
| 5449 | + |
| 5450 | + .if streq("$ENABLE_SSL", 1) |
| 5451 | + |
| 5452 | +will compare the environment variable "ENABLE_SSL" to the value " 1" (with a |
| 5453 | +single leading space). The reason is the line is first split into words like |
| 5454 | +this: |
| 5455 | + |
| 5456 | + .if streq("$ENABLE_SSL", 1) |
| 5457 | + |---|--------------------| |--| |
| 5458 | + 1 2 3 |
| 5459 | + |
| 5460 | +then the weak quoting is applied and environment variable "$ENABLE_SSL" is |
| 5461 | +resolved (let's say for example that ENABLE_SSL=0), and finally the words are |
| 5462 | +reassembled into a single string by placing a single space between the words: |
| 5463 | + |
| 5464 | + .if streq(0, 1) |
| 5465 | + |---|-------|--| |
| 5466 | + 1 2 3 |
| 5467 | + |
| 5468 | +and only then it is parsed as a single expression. The space that was inserted |
| 5469 | +between the comma and "1" is still part of the argument value, making this |
| 5470 | +argument " 1": |
| 5471 | + |
| 5472 | + .if streq(0, 1) |
| 5473 | + |---|-----|-|--| |
| 5474 | + \ \ \ \_ argument2: " 1" |
| 5475 | + \ \ \___ argument1: "0" |
| 5476 | + \ \_______ function: "streq" |
| 5477 | + \___________ directive: ".if" |
| 5478 | + |
| 5479 | +It's visible here that even if ENABLE_SSL had been equal to "1", it wouldn't |
| 5480 | +have matched " 1" since the string would differ by one space. |
| 5481 | + |
| 5482 | +Note: as explained in section "2.2. Quoting and escaping", a good rule of thumb |
| 5483 | + is to never insert unneeded spaces inside expressions. |
| 5484 | + |
| 5485 | +Note that like in other languages, the AND operator has precedence over the OR |
| 5486 | +operator, so that "A && B || C && D" evalues as "(A && B) || (C && D)". |
| 5487 | + |
5437 | 5488 | The list of currently supported predicates is the following: |
5438 | 5489 |
|
5439 | 5490 | - defined(<name>) : returns true if an environment variable <name> |
@@ -5679,6 +5730,7 @@ <h2 id="chapter-2.7" data-target="2.7"><small><a class="small" href="#2.7">2.7.< |
5679 | 5730 | - <a href="#nopoll">nopoll</a> |
5680 | 5731 | - <a href="#noreuseport">noreuseport</a> |
5681 | 5732 | - <a href="#nosplice">nosplice</a> |
| 5733 | + - <a href="#profiling.memory">profiling.memory</a> |
5682 | 5734 | - <a href="#profiling.tasks">profiling.tasks</a> |
5683 | 5735 | - <a href="#server-state-base">server-state-base</a> |
5684 | 5736 | - <a href="#server-state-file">server-state-file</a> |
@@ -7976,7 +8028,7 @@ <h2 id="chapter-4.1" data-target="4.1"><small><a class="small" href="#4.1">4.1.< |
7976 | 8028 | <tr><td ><a href="#4-option%20tcp-smart-accept"><span class="pull-right"><span>(*)</span></span>option tcp-smart-accept</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td></tr> |
7977 | 8029 | <tr><td ><a href="#4-option%20tcp-smart-connect"><span class="pull-right"><span>(*)</span></span>option tcp-smart-connect</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td></tr> |
7978 | 8030 | <tr><td ><a href="#4-option%20tcpka">option tcpka</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td></tr> |
7979 | | -<tr><td ><a href="#4-option%20tcplog">option tcplog</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td></tr> |
| 8031 | +<tr><td ><a href="#4-option%20tcplog">option tcplog</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td></tr> |
7980 | 8032 | <tr><td ><a href="#4-option%20transparent"><span class="pull-right"><span>(*)</span></span>option transparent</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td></tr> |
7981 | 8033 | <tr><td ><a href="#4-option%20idle-close-on-response"><span class="pull-right"><span>(*)</span></span>option idle-close-on-response</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td></tr> |
7982 | 8034 | <tr><td ><a href="#4-external-check%20command">external-check command</a></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"> </td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td><td class="pagination-centered"><img src="../css/check.png" alt="X" title="yes" /></td></tr> |
@@ -13328,7 +13380,8 @@ <h2 id="chapter-4.2" data-target="4.2"><small><a class="small" href="#4.2">4.2.< |
13328 | 13380 | third retry. You can disable redispatches with a value of 0.</pre> |
13329 | 13381 | </div> |
13330 | 13382 | <pre class="text">In HTTP mode, if a server designated by a cookie is down, clients may |
13331 | | -definitely stick to it because they cannot flush the cookie, so they will not |
| 13383 | +definitely stick to it, for example when using "<a href="#option%20persist">option persist</a>" or |
| 13384 | +"<a href="#force-persist">force-persist</a>", because they cannot flush the cookie, so they will not |
13332 | 13385 | be able to access the service anymore. |
13333 | 13386 |
|
13334 | 13387 | Specifying "<a href="#option%20redispatch">option redispatch</a>" will allow the proxy to break cookie or |
@@ -13360,7 +13413,7 @@ <h2 id="chapter-4.2" data-target="4.2"><small><a class="small" href="#4.2">4.2.< |
13360 | 13413 |
|
13361 | 13414 | If this option has been enabled in a "defaults" section, it can be disabled |
13362 | 13415 | in a specific instance by prepending the "no" keyword before it. |
13363 | | -</pre><div class="page-header"><b>See also :</b> "<a href="#retries">retries</a>", "<a href="#force-persist">force-persist</a>"</div> |
| 13416 | +</pre><div class="page-header"><b>See also :</b> "<a href="#option%20persist">option persist</a>", "<a href="#force-persist">force-persist</a>", "<a href="#retries">retries</a>"</div> |
13364 | 13417 | <a class="anchor" name="option"></a><a class="anchor" name="4-option"></a><a class="anchor" name="4.2-option"></a><a class="anchor" name="option (Proxies)"></a><a class="anchor" name="option (Alphabetically sorted keywords reference)"></a><a class="anchor" name="option redis-check"></a><a class="anchor" name="4-option redis-check"></a><a class="anchor" name="4.2-option redis-check"></a><a class="anchor" name="option redis-check (Proxies)"></a><a class="anchor" name="option redis-check (Alphabetically sorted keywords reference)"></a><div class="keyword"><b><a class="anchor" name="option redis-check"></a><a href="#4.2-option%20redis-check">option redis-check</a></b></div><pre class="text">Use redis health checks for server testing |
13365 | 13418 | </pre><div><p> May be used in sections :</p><table class="table table-bordered" border="0" cellspacing="0" cellpadding="0"> |
13366 | 13419 | <thead><tr><th>defaults</th><th>frontend</th><th>listen</th><th>backend</th></tr></thead> |
@@ -16292,8 +16345,8 @@ <h2 id="chapter-4.2" data-target="4.2"><small><a class="small" href="#4.2">4.2.< |
16292 | 16345 | <span class="comment"># and reject everything else. (works for HTTP/1 and HTTP/2 connections)</span> |
16293 | 16346 | acl is_host_com hdr(Host) -i example.com |
16294 | 16347 | tcp-request inspect-delay 5s |
16295 | | -tcp-request switch-mode http if HTTP |
16296 | | -tcp-request reject <span class="comment"># non-HTTP traffic is implicit here</span> |
| 16348 | +tcp-request content switch-mode http if HTTP |
| 16349 | +tcp-request content reject <span class="comment"># non-HTTP traffic is implicit here</span> |
16297 | 16350 | ... |
16298 | 16351 | http-request reject unless is_host_com |
16299 | 16352 | </code></pre> |
@@ -23564,9 +23617,10 @@ <h2 id="chapter-8.4" data-target="8.4"><small><a class="small" href="#8.4">8.4.< |
23564 | 23617 | instance during a POST request, the time already runs, and this can distort |
23565 | 23618 | apparent response time. For this reason, it's generally wise not to trust |
23566 | 23619 | too much this field for POST requests initiated from clients behind an |
23567 | | - untrusted network. A value of "-1" here means that the last the response |
23568 | | - header (empty line) was never seen, most likely because the server timeout |
23569 | | - stroke before the server managed to process the request. |
| 23620 | + untrusted network. A value of "-1" here means that the last response header |
| 23621 | + (empty line) was never seen, most likely because the server timeout stroke |
| 23622 | + before the server managed to process the request or because the server |
| 23623 | + returned an invalid response. |
23570 | 23624 |
|
23571 | 23625 | - Td: this is the total transfer time of the response payload till the last |
23572 | 23626 | byte sent to the client. In HTTP it starts after the last response header |
@@ -24801,7 +24855,7 @@ <h2 id="chapter-11.3" data-target="11.3"><small><a class="small" href="#11.3">11 |
24801 | 24855 | <br> |
24802 | 24856 | <hr> |
24803 | 24857 | <div class="text-right"> |
24804 | | - HAProxy 2.4.28-1 – Configuration Manual<br> |
| 24858 | + HAProxy 2.4.28-65 – Configuration Manual<br> |
24805 | 24859 | <small>, 2024/11/08</small> |
24806 | 24860 | </div> |
24807 | 24861 | </div> |
|
0 commit comments