mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
[DOC] add some informations about 'stats' and 'option httpclose'.
This commit is contained in:
parent
052c15dbe6
commit
d4ba08d7ca
@ -2347,33 +2347,35 @@ Example :
|
|||||||
# simple application with authenticated embedded status report
|
# simple application with authenticated embedded status report
|
||||||
listen app1 192.168.1.100:80
|
listen app1 192.168.1.100:80
|
||||||
mode http
|
mode http
|
||||||
|
option httpclose
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
cookie SERVERID postonly insert indirect
|
cookie SERVERID postonly insert indirect
|
||||||
server srv1 192.168.1.1:8080 cookie srv1 check inter 1000
|
server srv1 192.168.1.1:8080 cookie srv1 check inter 1000
|
||||||
server srv1 192.168.1.2:8080 cookie srv2 check inter 1000
|
server srv1 192.168.1.2:8080 cookie srv2 check inter 1000
|
||||||
stats uri /my_stats
|
stats uri /my_stats
|
||||||
stats realm Statistics\ for\ MyApp1-2
|
stats realm Statistics\ for\ MyApp1-2
|
||||||
stats auth guest:guest
|
stats auth guest:guest
|
||||||
stats auth admin:AdMiN123
|
stats auth admin:AdMiN123
|
||||||
stats scope .
|
stats scope .
|
||||||
stats scope app2
|
stats scope app2
|
||||||
|
|
||||||
# simple application with anonymous embedded status report
|
# simple application with anonymous embedded status report
|
||||||
listen app2 192.168.2.100:80
|
listen app2 192.168.2.100:80
|
||||||
mode http
|
mode http
|
||||||
|
option httpclose
|
||||||
balance roundrobin
|
balance roundrobin
|
||||||
cookie SERVERID postonly insert indirect
|
cookie SERVERID postonly insert indirect
|
||||||
server srv1 192.168.2.1:8080 cookie srv1 check inter 1000
|
server srv1 192.168.2.1:8080 cookie srv1 check inter 1000
|
||||||
server srv1 192.168.2.2:8080 cookie srv2 check inter 1000
|
server srv1 192.168.2.2:8080 cookie srv2 check inter 1000
|
||||||
stats uri /my_stats
|
stats uri /my_stats
|
||||||
stats realm Statistics\ for\ MyApp2
|
stats realm Statistics\ for\ MyApp2
|
||||||
stats scope .
|
stats scope .
|
||||||
|
|
||||||
listen admin_page :8080
|
listen admin_page :8080
|
||||||
mode http
|
mode http
|
||||||
stats uri /my_stats
|
stats uri /my_stats
|
||||||
stats realm Global\ statistics
|
stats realm Global\ statistics
|
||||||
stats auth admin:AdMiN123
|
stats auth admin:AdMiN123
|
||||||
|
|
||||||
Notes :
|
Notes :
|
||||||
-------
|
-------
|
||||||
@ -2388,6 +2390,11 @@ Notes :
|
|||||||
remove it from the browser so it will be sent to the whole application
|
remove it from the browser so it will be sent to the whole application
|
||||||
upon further accesses.
|
upon further accesses.
|
||||||
|
|
||||||
|
- It is very important that the 'option httpclose' is specified, otherwise
|
||||||
|
the proxy will not be able to detect the URI within keep-alive sessions
|
||||||
|
maintained between the browser and the servers, so the stats URI will be
|
||||||
|
forwarded unmodified to the server as if the option was not set.
|
||||||
|
|
||||||
|
|
||||||
=========================
|
=========================
|
||||||
| System-specific setup |
|
| System-specific setup |
|
||||||
|
Loading…
Reference in New Issue
Block a user