Redirect: two physical servers and one external IP

Hello!
I have two sites and two physical servers and one external IP (Mikrotik-based router). Site №1 on server №1, site №2 on server №2.
HestiaCP (nginx only) is installed on each of the servers.
How can I make the requests to the site serve the corresponding servers?
As far as I understand, it is necessary to register both sites (site №1 and №2) on one physical server №1 and create a redirect for site №2?
Can it be done through HestiaCP?
Thanks in advance for the tips!

no, cant we solved with hestia. You probaly need an additional nginx proxy in front of it, then redirect the requests from there- but never have done this.

I think that pfSense has some squid reverse proxy stuff built into it. I’d horse around with it, but I don’t have the budget right now with VPS. and I don’t think that I could possibly setup PfSense on my VPS provider if my life depended on it, they don’t allow me to upload custom .ISO yet

Before I bought Mikrotik, I had a software router on pfSense (before that on ClearOS). I don’t remember them being able to determine which domain is being accessed.

I did this once on VestaCP by editing the nginx config. But I thought there are some best practices

1 Like

Use can use proxy template and forward traffic to server over internal ip

still possible when you use custom templates, but probaly a software like https://nginxproxymanager.com/ could fit better - but never used.

1 Like

Where in the panel interface can I select such a template?

Using nginxproxymanager requires the addition of another server.
I am sure that it is possible to make a redirect using nginx or by creating a template for it.