From 5c7bf798142502d8aed917fb0da433049cec4495 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 13 Feb 2008 01:07:57 +0100 Subject: [PATCH] [DOC] add a configuration entry for "server ... redir " --- doc/configuration.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index 0e409881e8..900b9a719d 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -3844,6 +3844,24 @@ port inetd for instance. This parameter is ignored if the "check" parameter is not set. See also the "addr" parameter. +redir + The "redir" parameter enables the redirection mode for all GET and HEAD + requests addressing this server. This means that instead of having HAProxy + forward the request to the server, it will send an "HTTP 302" response with + the "Location" header composed of this prefix immediately followed by the + requested URI beginning at the leading '/' of the path component. That means + that no trailing slash should be used after . All invalid requests + will be rejected, and all non-GET or HEAD requests will be normally served by + the server. Note that since the response is completely forged, no header + mangling nor cookie insertion is possible in the respose. However, cookies in + requests are still analysed, making this solution completely usable to direct + users to a remote location in case of local disaster. Main use consists in + increasing bandwidth for static servers by having the clients directly + connect to them. Note: never use a relative location here, it would cause a + loop between the client and HAProxy! + + Example : server srv1 192.168.1.1:80 redir http://image1.mydomain.com check + rise The "rise" parameter states that a server will be considered as operational after consecutive successful health checks. This value defaults to 2 -- 2.47.3