Community discussions

MikroTik App
 
mdennyh
just joined
Topic Author
Posts: 5
Joined: Wed May 08, 2019 11:28 am

Reverse proxy (like nginx) in Mikrotik

Tue Sep 29, 2020 6:48 am

I have 2 server that's located in the same LAN network.
But I only have one network and one mikrotik router.
I need to access both server from outside (internet) with something like nginx in Linux, eg:

www.someexample.com ---> forwarded to IP 192.168.88.100 (SERVER 1)
www.otherexample.com ---> forwared to IP 192.168.88.200 (SERVER 2)

Is this even possible in Mikrotik? and how do I do that ?
Thank you in advance
 
joegoldman
Forum Veteran
Forum Veteran
Posts: 767
Joined: Mon May 27, 2013 2:05 am

Re: Reverse proxy (like nginx) in Mikrotik

Tue Sep 29, 2020 7:22 am

No.

Well maybe with L7 rules but I don't think so.

And its not best to put reverse proxy in a router. Its not an all-in-one box, its a router.

If you have control over both servers (nginx or apache) set one as the primary, and create a virtualhost for the other and reverse proxy from server 1 to server 2, so 80,443 can be forwarded just to server 1 and both will work.

My network I run different apps on different VM's - and I run a VM just for reverse proxy with all my sites for my NAT to punch through to.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Reverse proxy (like nginx) in Mikrotik

Wed Sep 30, 2020 5:19 pm

I wouldn't do, except maybe for some light hobby use, but it's possible to misuse built-in web proxy (only for http, not https):

https://wiki.mikrotik.com/wiki/Multiple_Web_Servers

Who is online

Users browsing this forum: shahzaddj1 and 145 guests