The Service
statements define backends to use and conditions
a request should satisfy in order to be routed to these backends.
These statements can appear both within ListenHTTP
(ListenHTTPS
) sections and outside of them. When processing an
incoming request, the listener will first try to match it against
services defined within it. If none of these services matches the
request, it will try to match it against services defined in the top
level. If a matching service is found, it will be used to process the
request. Otherwise a 503 (Service Unavailable) response will be
returned.
A service is defined by a section statement that begins with the
Section
keyword, followed by service definition statements and
terminated by End
on a line by itself:
Service "name" … End
Optional name argument assigns a symbolic name to the
service. That name is used to identify the service in diagnostic
and access log messages (see ‘%{obj}N’),
metric output (see Metrics), and in poundctl
requests (see poundctl). In the absence of an assigned
name, the ordinal number of the service in the enclosing section
is used as its identifier. Service numbers start at 0.
Following subsections discuss statements that can be used in
Service
sections.