summaryrefslogtreecommitdiff
path: root/frontend/haproxy.cfg
blob: 2ac0b8501665abda63790c5ad3b91cfca0a94b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# HAProxy configuration for Baserock Project front-end proxy.

global
    maxconn 4000

    daemon
    pidfile /var/run/haproxy.pid
    user haproxy
    group haproxy

    log /dev/log local0
    stats socket /var/lib/haproxy/stats

defaults
    mode http
    timeout connect 5000ms
    timeout client 50000ms
    timeout server 50000ms

    log global
    option httplog

frontend http-in
    bind *:80

    # Rules below here implement the URL-based forwarding to the
    # appropriate instance. The hdr(host) call means 'extract the
    # first Host header from the HTTP request or response', the '-m beg'
    # switch means 'match against the beginning of it' and the '-i' flag
    # makes the match case-insensitive.
    #
    # See <https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#7>
    # for more documentation than you ever dreamed of.

    acl host_openid hdr(host) -m beg -i openid
    use_backend baserock_openid_provider if host_openid

# Entries here locate each server backend.

backend baserock_openid_provider
    server baserock_openid_provider IP