Answer the question
In order to leave comments, you need to log in
One white IP address from the provider redirect on mikrotik to 2 servers?
Rostelecom gives one white ip address: XXX.YYY.ZZZ.112, so far, one domain name is attached to it: name1domain.ru via reg.ru, coming to the mikrotik port. There are 2 servers (website): 192.168.10.241 and 192.168.10.240. On the second (192.168.10.240) there is already a forwarding to mikrotik. Is it worth registering a second domain name to the same white ip address? How to make it possible to access 2 domain names by one ip address (ie, to both sites)?
For example, a person enters:
1) name1domain.ru and gets to 192.168.10.240,
2) name2domain.ru and gets to 192.168.10.241.
And all this through one white ip address.
PS I didn’t find the article or didn’t look for it well, if you know, then just write back.
Answer the question
In order to leave comments, you need to log in
Implementation with nginx, Thanks to "Sanes":
https://www.dmosk.ru/miniinstruktions.php?mini=ngi...
Nginx Proxy if different servers. If there is one, then several sites on the same IP will get along fine.
1. the domain name is not registered to the address
2. virtual host - most web servers can do this and you don't even need to fence several computers for nat - just one that will serve at least 100,500 different sites.
Moreover, most web servers have long been sharpened for this with a good separation of authority levels.
The only solution I see " on the forehead " is to have a separate web server or web proxy on Mikrotik.
The fact is that information about the domain is transmitted in the HTTP or HTTPS protocol, and the web server is engaged in parsing this protocol. Further, this web server can redirect the call to another server - these are the details.
You can, of course, come up with some kind of filter, but keep in mind that the request is made by the browser, and different browsers, as well as all sorts of bots, can form request headers differently, depending on the version, settings and supported features in the browser. It should be a pretty smart filter.
And since such a song went, then why, in fact, Mikrotik? Then you can put a full-fledged server as a router with all the flexibility that implies.
Well, as another option - move your sites to one server, for example 192.168.10.240.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question