Hello,
I'm trying to configure relayd(8) to use tags, to allow legit host names
only and modify HTTP headers, and fallback. But I can't have it working
properly.
Using such a configuration:
#-8<-------
table <primary> { 192.0.2.4 }
table <fallback> { 192.0.2.7}
http protocol www {
block
match request header "Host" value "www.example" tag "example"
pass request tagged "example" forward to <primary>
}
relay www {
listen on 192.0.2.30 port 80
protocol www
forward to <primary> port 80 check http "/" code 200
forward to <fallback> port 80
}
#-8<-------
forwards all tagged HTTP traffic to the primary server. But if it is
turned off, relayd(8) only replies with error rather than sending the
traffic to the fallback server.
Removing tags and using a simple "pass" directive in protocol (as
described in the man page) does work as expected regarding the fallback
server.
Is there a way to use both tags and fallback with relayd(8) to mimic
Apache's Failover[1] configuration with "ProxyPass" and "BalancerMember
(...) status=+H" ?
Thank you,
Joel C.
[1] https://httpd.apache.org/docs/trunk/howto/reverse_proxy.html#failover