A
A
Alexey Tutubalin2014-12-10 20:27:30
Nginx
Alexey Tutubalin, 2014-12-10 20:27:30

How to hide the main server?

There is a server with ip 1.1.1.1 on it there are many sites of various topics, including trackers (prohibited, but not yet blocked) there is a vps through which site traffic goes to the main server (proxy_pass in nginx) and dns is raised on the same vps ( ns1.site.ru and ns2.site.ru) for these domains, I want to buy another vps and set up another dns server on it for stability if one goes out of troy (ns3.site.ru and ns4.site.ru) .
1) How to attach a domain to another server if it is already attached to one?
2) How to proxy other services such as xbt?
3) What will be the proposals for the stability and protection of the main server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Petrikov, 2014-12-10
@Kennius

1) Just like the first one, register the same domain name for another IP, requests will be divided equally between all linked addresses.
2) Well, since there is already nginx, why be especially wise

location ~ ^/(an|announce) {
proxy_pass http://127.0.0.4:2710;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}

3) Yes, you are generally on the right track, solve problems as they come, premature optimization is always out of place and spends a lot of effort.

P
Pavel Angelin, 2014-12-10
@angelin

Set haproxy to the front. In its config, you can configure host recognition and scatter across the servers you need.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question