Prev: Next: Up: Backends[Contents][Index]


9.11.4.3 Special Backends

Special backends are backends that don’t rely on an external server to handle the response, but instead are served by pound itself.

Service directive: Error status [file]

Return a particular HTTP status.

The status argument supplies the HTTP status code to return.

Optional file argument is the name of a disk file with the error page content. If not supplied, the text is determined as usual: first the ErrorFile status statement from the enclosing listener is consulted. If it is not present, the default error page is used.

This directive is useful in a catch-all service, which outputs an error page if no service matching the incoming request was found. See Error responses, for a discussion.

Service directive: Redirect [code] "url"

Declares a special backend that responds to each request with a redirect response.

Optional code can be one of: 301, 302 (the default), 303, 307, or 308.

The url argument specifies the URL to redirect the request to. Before use it is expanded as described in String Expansions.

For compatibility with previous pound versions, if no ‘$n’ references are found in url, the following logic is used: if it is a "pure" host (i.e. with no path) then the client will be redirected to that host, with the original request path appended. If the url does contain a path (even if it is just a ‘/’), then the request path is ignored.

See Redirects, for a detailed discussion of this backend and its use.

Service directive: Control

Defines a special backend that serves pound management interface. See Remote Access to Management Interface, for a detailed discussion of this feature.

Service directive: Metrics

This directive defines a special backend that generates Openmetric telemetry output on the given URL. Example usage:

Service
    URL "/metrics"
    Metrics
End

To control access to the telemetry endpoint, use the ACL statement (see ACL).

The LogSuppress directive (see LogSuppress) is often used in openmetric services to suppress logging of served HTTP requests:

Service
    URL "/metrics"
    Metrics
    ACL "secure"
    LogSuppress success
End

The metrics output is discussed in Metric Families.

Service directive: Emergency ... End

Defines an emergency backend, which will be used only if all other backends become unavailable. See Backend, for a discussion of directives that can be used within Emergency section.

If multiple Emergency sections are defined, an emergency backend to use will be selected using the usual balancing technique (see Request balancing).


Prev: Next: Up: Backends[Contents][Index]