D
D
DdarkX2017-08-23 13:03:06
Debian
DdarkX, 2017-08-23 13:03:06

One domain and multiple servers?

Good day.
Last year I saw an interesting note that told how it is possible to divide tasks between servers under one domain per nat. That is, when typing name.ru, the server on which the web server worked, but when sending to the mail [email protected], the mail was processed by another server. What is most remarkable is the web-face of the mailer, it also opened, the whole kitchen worked in one local network and under one domain.
Time passed, the article got lost, but the task appeared and I couldn’t figure out how to make the web server and the mail server be on the same network, on different machines and under the same domain.
Thanks

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Q
Q001, 2017-08-23
@Q001

This is the most banal port forwarding through NAT.
Go to any router (at least home) - and look at this menu item (sometimes it can be called differently, but usually it's forwarding).
It says so:
port 80 - web server - one IP address on the local network
port 110 - mail server for receiving mail - another IP address on the local network
, I don't remember which port - mail server for sending mail - the third IP address on the local network.

B
Boris Korobkov, 2017-08-23
@BorisKorobkov

when typing name.ru worked out the server on which the web server

A-record DNS
DNS MX record
DNS A- or CNAME record
If they all point to the same IP, then use Nginx to use different locations on different domains/ports

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question