wonderful, thanks Omar!
somehow I missed it! my bad.
I wrote a basic relayd.conf, which of course doesn't work.
http protocol "http" {
match request header set "X-Forwarded-For" value "$REMOTE_ADDR"
}
relay "web" {
listen on 0.0.0.0 port 443 tls
protocol "http"
forward to 127.0.0.1 port 3000
tls {
certificate "/etc/ssl/birbi.biz:443.crt"
key "/etc/ssl/private/birbi.biz:443.key"
}
}
I'll keep working on it, but after a couple of days spent on this stuff I'm
starting to think that maybe to serve my node app there should be an easier way
than openbsd ;)
On Fri, Apr 19, 2024, at 12:50 AM, Omar Polo wrote:
> Hello,
>
> On 2024/04/18 22:29:55 +0200, "Luca Leone" <[email protected]> wrote:
> > Hi guys!
> >
> > [...]
> >
> > If is change `pass to "http://localhost:3000/"` with a simple `root
> > "/var/www/htdocs"` directive,
> > the syntax check is OK.
> >
> > The reason for the `pass to "http://localhost:3000/"` directive is that I
> > am running a node app on
> > /home/luca/node-app, and I want to forward requests to that server.
> >
> > Any idea on what I am missing?
>
> httpd doesn't support forwarding requests to another HTTP server sadly.
> It only supports FastCGI, or serving static files. `pass to' is not
> part of the httpd' configuration language.
>
> take a look at relayd(8) for proxying requests.
>
>
> Cheers,
>
> Omar Polo
>