Hi, On Fri, Jun 20, 2014 at 10:35:13PM -0400, Predrag Punosevac wrote: > I am seriously reading realyd man pages for the first time in my life. > Namely I am after url suffix redirection. I will try to explain little > bit better. > > I have close to 10 virtual hosts running behind OpenBSD firewall which > has a single public IP address. My boss insists that all virtual hosts > be reachable on the port 80. Can relayd do url suffix redirection? What > I mean is a map: > > www.autonlab.org ----> 10.0.0.0 host > www.autonlab.org/web1 ----> 10.0.0.1 host > www.autonlab.org/web2 ----> 10.0.0.2 host > www.autonlab.org/web3 ----> 10.0.0.3 host > > and so on. Until now I was using nginx as a proxy and port redirection > > www.autonlab.org ----> 10.0.0.0 > www.autonlab.org:8080 ----> 10.0.0.1 > > and so on so forth. >
I didn't answer before because it was not supported by relayd but I was working on the filter upgrade that got committed yesterday. Your mail was almost a month ago, so you probably found another solution now, but it works in -current and the upcoming release with something like the following: ---snip--- table <web0> { 10.0.0.0 } table <web1> { 10.0.0.1 } table <web2> { 10.0.0.2 } table <web3> { 10.0.0.3 } http protocol autonlab { return error pass match request patch "/web1*" forward to <web1> match request patch "/web2*" forward to <web2> match request patch "/web3*" forward to <web3> } relay autonlab { listen on 128.2.204.171 port 80 protocol autonlab # Main server table forward to <web0> check tcp port 80 # Additional server tables used by custom rules forward to <web1> check tcp port 80 forward to <web2> check tcp port 80 forward to <web3> check tcp port 80 } ---snap--- Reyk