A
A
alex1nd2016-08-19 02:37:33
Nginx
alex1nd, 2016-08-19 02:37:33

How to use 2 ip addresses at once for vps?

the provider gave 2 ip in two cities. I sent the site to the SP that is closer geographically to the audience. Although the site also opens on the second ip. But sometimes it lags (in terms of response)
I saw on some sites several ips are used at once. How can you add a second one? Can it help with this ?, so that when he lags on the second switch.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2016-08-19
@alex1nd

Both Nginx and Apache listen by default on socket address 0.0.0.0 , which, from the point of view of the OS, matches any IP. Unless you specifically set a specific IP that will listen, for example for Nginx:

server {
    listen 192.168.1.1:80;
}
Nginx listen
documentation Apache example: Apache
Listen documentation .
So, if you do not specifically change anything, then the site will be available on all IPs that are delegated to the server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question