A
A
Arseniy Latypov2019-11-10 11:33:59
linux
Arseniy Latypov, 2019-11-10 11:33:59

How to connect domains to specific machines on the same network?

Good day to all
There are two domains (let's call them site1.ru and site2.ru), both dns type A records are configured for one external ip address, two web servers hang behind this external address on the mikrotik router (one physical - serv1, another virtual one is serv2), their 80 ports are forwarded outside. The problem is this: when I go to site1 and site2 displays a page from the serv1 web server (mod_rewrite is enabled on it, but nothing changes when it is disabled; I cleared the cache and checked it from other browsers), ServerName and ServerAlias ​​are written on both machines in the file etc/apache2/sites-available/000-default.conf. If you cut down the serv1 web server and go to the site2.ru domain, then we get to the serv2 web server
Please, tell me how to make site1.ru request redirect to serv1, and site2.ru request to serv2 Thank you all in
advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dim Boy, 2019-11-10
@ceh9_lat

Apache mod_proxy needs to be configured normally.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question