I
I
Igor Vedenov2020-11-18 08:56:00
Nginx
Igor Vedenov, 2020-11-18 08:56:00

How to host 2 sites on two servers with one white ip address?

The situation is this. Given:
The router is 192.168.0.1 , its white IP is (conditionally) 1.2.3.4 , in its subnet there is a server to which ports 80 and 443 are forwarded (the server has NGINX and APACHE), the internal address of the server is 192.168.0.50 .

You need to add another server with the same ports, but with an internal address of 192.168.0.60 .
The distinction will go at the domain level. The new site is planned to be more loaded than the first one.

How to implement it? I understand that you need to configure NGINX proxy/relay/??? I just don't get how.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Fedoseev, 2020-11-18
@pskov-igor

nginx should be at the traffic split point. Is there no way to install and configure nginx on the router?
If not, the router forwards all traffic 80 and 443 to the first server, the first server has nginx \ haproxy, which already separates the traffic by domains and sends part to the second.

A
Alexey Dmitriev, 2020-11-18
@SignFinder

In this configuration, only using a reverse proxy on nginx on the first server, which will forward requests for a specific domain to the second server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question