Re: Relayd, how to relay-to based on path
Hey, thanks a lot for your kind reply, and sorry for this late answer. >> In the Paper "Recent work in OpenBSD relayd" from 2013 there is an >> example with: match request path "/images" relay-to 10.1.1.1 >> Basically I need that and a second statement with >> match request path "/app" relay-to 10.1.1.2 > on case this was not answered yet: > > Use the following in your protocols section: > >match request path "/some/path/**" forward to > > You need something like > >forward to port www mode roundrobin \ >check http "/" code 200 timeout 1000 > > in your relay section as well. This is great, it seems to work like a charm! My configuration now has two tables defined and . In the protocols section, I have then match request path "/collab/**" forward to match request path "/svn/**" forward to match request path "/hg/**" forward to and in the relay section I got: forward to port forward to port 8000 That was a nice holiday present, thank you! Harald
Re: Relayd, how to relay-to based on path
Harald Klimach(har...@klimachs.de) on 2014.11.30 11:32:33 +0100: > Hello, > I am trying to substitute a nginx proxy by relayd and would like to > forward connections to different backends, based on the path in the > request. > In the Paper "Recent work in OpenBSD relayd" from 2013 there is an > example with: match request path "/images" relay-to 10.1.1.1 > Basically I need that and a second statement with > match request path "/app" relay-to 10.1.1.2 > But, the relay-to option apparently is gone by now, and the filter > need to be put into the protocol section. I tried to use to relays > with the same listen on statement, but this results only in the > second one overwriting the first one. Is it still possible with the > new syntax to achieve conditional relays to different servers based > on the request path? If so, how? I think, I somehow need to get > some information from the protocol section into the relay to base the > forward to decision on, but I have no clue how to achieve that. > > Thanks a lot for any pointers! > Harald Hi, on case this was not answered yet: Use the following in your protocols section: match request path "/some/path/**" forward to You need something like forward to port www mode roundrobin \ check http "/" code 200 timeout 1000 in your relay section as well. /Benno
Relayd, how to relay-to based on path
Hello, I am trying to substitute a nginx proxy by relayd and would like to forward connections to different backends, based on the path in the request. In the Paper "Recent work in OpenBSD relayd" from 2013 there is an example with: match request path "/images" relay-to 10.1.1.1 Basically I need that and a second statement with match request path "/app" relay-to 10.1.1.2 But, the relay-to option apparently is gone by now, and the filter need to be put into the protocol section. I tried to use to relays with the same listen on statement, but this results only in the second one overwriting the first one. Is it still possible with the new syntax to achieve conditional relays to different servers based on the request path? If so, how? I think, I somehow need to get some information from the protocol section into the relay to base the forward to decision on, but I have no clue how to achieve that. Thanks a lot for any pointers! Harald