Good find. Thank you! That helped a lot. This relayd.conf works now, if I
switch httpd to listen to port 81:
relayd_address="127.0.0.1"
table <httpd> { 127.0.0.1 }
table <ruby> { 127.0.0.1 }
http protocol reverse_proxy {
match request path "/hello" forward to <ruby>
match response header set "Connection" value "close"
tcp { nodelay, sack }
}
relay www {
listen on $relayd_address port 80
protocol reverse_proxy
forward to <httpd> check tcp port 81
forward to <ruby> check tcp port 3000
}
On Tue, Jul 26, 2016 at 11:27 PM, Comète <[email protected]> wrote:
> 26 juillet 2016 12:20 "Miles Keaton" <[email protected]> a écrit:
> > Sorry to bother the list with this, but still stumped after two days.
> >
> > Trying to switch from nginx to httpd, but there's just one thing left:
> >
> > Having the webserver pass some URLs to another port:
> >
> > # working nginx config:
> > http {
> > server {
> > listen 80;
> > # serving static here
> > root /var/www/htdocs/test;
> > # but this URL is sent to Ruby rack server
> > location = /hello {
> > proxy_pass http://127.0.0.1:3000;
> > }
> > }
> > }
> >
> > I'm assuming I need relayd to do this, but still stumped after two days
> of
> > reading and experimenting with man 5 relayd.conf.
> >
> > Found this answer from Reyk from two years ago:
> > https://marc.info/?l=openbsd-misc&m=140508090726719&w=2
> > ... but maybe the syntax has changed since then, since relayd gives a
> syntax
> > error for that example, and any variation of it I've tried.
> >
> > Any suggestions?
> >
> > Thanks in advance.
>
>
> Hi,
>
> maybe this should help you:
>
>
>
https://www.reddit.com/r/openbsd/comments/3qb2c4/some_observations_about_rela
yd/