Recently, VPS with multiple IPs , such as the familiar Burst, DS, and VIRPUS, have always provided 2 independent IP addresses, while most of BudgetVM (ie Enzu) provide 3 IP addresses, UBI computer room 50 Just buy a C-segment IP, so many Chinese IDCs have become generous in providing IPs. However, the question that comes with it is, with so many IPs, how should I assign them? For example, if I have 3 IPs, is it possible to have one IP per site? For questions like this, Good VPS specially collects some information to share here. In this diary, we mainly explain the issue of assigning multiple IPs to in KLOXO, DA, and CP panels in the lnmp environment.

Use of multiple IPs in LNMP environment

LNMP does not have a graphical interface, but IP assignment under LNMP is relatively simple. Under normal circumstances, the VPS we buy has multiple IPs assigned to the VPS (this is different from independent servers, which need to be added by yourself). We can directly point different domain names to different IPs to access.
However, I will also talk about how to directly assign an IP to a certain domain name so that different IPs can access different domain names.
First, we use vhost to add a host (site), and then edit the site configuration file (directory: /usr/local/nginx/conf/vhost/your domain name.conf)
lnmp-ip
As shown above, generally modify the part after listen in the third line of the configuration file and add your independent IP address (the above picture is only for demonstration, assuming that the IP address you need to assign is 192.168.1.88).
After completion, Restart LNMP to make it take effect. Please remember that if you change the listen of the virtual host, you must change all the virtual host configuration files of this VPS. It will not work if you change less than one. After the change is completed, restart. (Now some friends have encountered the problem that after making such a change, the database management cannot be logged in with the previous IP + phpmyadmin, because there is no VPS test with multiple IPs on hand, so please pay attention to the change.)

Multiple IP usage under KLOXO

Under the KLOXO panel, we first need to add the IP to the panel. Follow my screenshot: log in to the KLOXO panel, click on Management → Server on the left, and then select localhost.
kloxo-ip01
Click "IP Address" in the main menu.
kloxo-ip02
Select Add IP Address to add multiple IP addresses to the panel.
kloxo-ip03
Next, we assign it to a site. First, make sure that the account (or domain name) has been added. Then, we configure an independent IP address for a certain domain name. First, go back to the KLOXO default directory → IP address, and then click on the IP that needs to be assigned.
***I need to explain here, because the VPS I used for screenshots only has 1 IP, so you can’t see more than one. However, this process is correct, everyone just needs to pay attention to the process***
kloxo-ip04
After selecting the IP, we switch to the "Configure Domain Name" item, select the IP, then select the domain name to assign the IP, and then Update.
kloxo-ip05
After completion, I also recommend that you restart the KLOXO panel.

Use of multiple IPs under DA and CP panels

A good VPS puts DA and CP at the end, and writes them together. The main reason is that these two panels are commercial panels, and the prices are not cheap, so individual users do not use them much.
I won’t take screenshots here, just explain. First, let’s talk about the use of multiple IPs in the DA panel.
The first step is to add IP. Log in to the DA panel, click IP Management in the menu, and then add IP records. If there are multiple IPs, please repeat this step.
The second step is to assign IP. There are two ways, one is to directly assign it to the reseller account in IP management, and the reseller account is then assigned to an account; the other way is to directly display all users, edit the user, and assign an IP to him.
Let’s talk about adding and using multiple IPs on the CP panel. In fact, it is not very accurate to say CP. The management side of CP should say WHM is more accurate. First, add IPs. Log in to WHM and select the menu Main→IP Functions→Add A New IP Address to add a new IP address.
After adding, assign it to an established user. You can directly click Account Information→List Accounts, click the + sign on the left side of the domain name account you want to assign an IP, then select change ip address, and select the IP you want to give him.
However, WHM can also set the newly created account to use an independent IP when the account has not been established, but this is not what this article needs to describe.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
4431

Leave a Reply