Skip to content

Target backend based on path #1185

@antedebaas

Description

@antedebaas

I would like to be able to target a example.com to one backend and example.com/instance to a different backend.
eg:

[clusters.example]
protocol = "http"
https_redirect = true
sticky_session = true
frontends = [,
    { address = "0.0.0.0:443", hostname = "example.com", certificate = "cert.pem", key = "privkey.pem", certificate_chain = "chain.pem" },
    { address = "0.0.0.0:443", hostname = "example.com", path = "/instance", certificate = "cert.pem", key = "privkey.pem", certificate_chain = "chain.pem" }
]
backends  = [
    { address = "127.0.0.1:8001" , sticky_id = "backend1_1"}
    { address = "127.0.0.1:8002" , sticky_id = "backend1_2"}
    { address = "127.0.0.1:8011" , sticky_id = "backend2_1", for_path="/instance"}
    { address = "127.0.0.1:8012" , sticky_id = "backend2_2", for_path="/instance"}
]

currently i would have to create 2 clusters with the second one on an different host (eg instance.example.com)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions