Managing servers with free VestaCP control panel make things easier for Web Hosts. However, due to IP blacklisting or server migration, server owner may need a VestaCP IP address change.

Luckily, VestaCP has a feature to change IP address with simple steps. But, wrong IP address create problems with admin panel and websites.

At Bobcares, we often get requests from our customers to change the IP address in VestaCP as part of our Server Management Services.

Today, we’ll see how our Support Engineers change the IP address in VestaCP and fix related errors.

 

Need for Changing the IP address

Web users may need to change their server IP address for several reasons. Sometimes, the need may arise when the current server IP address gets blacklisted or because of server migration. Again, in shared servers, many customers use same IP address within a server. Thus, in such cases, they may need to change their main shared IP address too.

Let’s see how our Support Engineers change the IP address in VestaCP.

 

How we perform VestaCP change IP address

Basically, websites and emails need the IP address to work effectively. If any change occurs in the IP address may badly affect on both websites and emails.

Also, its pretty straight forward to use VestaCP to change the IP address.

1. Initially, we create a file v-change-server-ip.

touch /usr/local/vesta/bin/v-change-server-ip

2. Then we set permission 0755 to the file v-change-server-ip.

chmod 0755 /usr/local/vesta/bin/v-change-server-ip

3. After that, we open the file and paste a code that changes all old IP to new IP (The code is available from the Github).

4. At last, we run the following command.

v-change-server-ip OLDIP NEWIP

This is how we change the IP address in VestaCP servers.

Finally, after changing the IP address, the VestaCP interface looks like following.

How we fixed the common errors

From our experience in managing servers, we’ve seen customers facing problems after changing the IP address in VestaCP. Let’s take a closer look at how our Support Engineers fixed these problems.

 

1. VestaCP admin panel not working

Recently, one of our customers contacted us with an error in VestaCP admin panel. He couldn’t access the Vestacp admin panel after changing the old server IP address to a new one.

Then our Support Engineers took the following steps to solve the issue.

1. To begin with, we logged into the server as a root user.

2. Then we ran the following command to update Vesta’s system IP address.

/usr/local/vesta/bin/v-update-sys-ip

That fixed the problem and admin panel became accessible on the new IP address.

 

2. Service down

Any server can crash due to faulty hardware. Such service down also create a need for VestaCP IP change.

For example, VPS hosting providers have to migrate the servers when the physical servers crash. And, they use backup from old servers while restoring individual backups. And, if we haven’t changed the VestaCP’s IP address, there may be an error in the VestaCP Admin panel. Also, we can’t log in to the admin panel with a new IP address.

In addition, services like httpd and nginx may not work with old IP address and cause website down issues.

Moreover, if you try to start the service httpd, you may get an error like,

[Sun May 04 05:50:16 2019] [warn] NameVirtualHost X.X.X.X:8443 has no VirtualHosts
(99)Cannot assign requested address: make_sock: could not bind to address X.X.X.X:8080
no listening sockets available, shutting down
Unable to open logs
Starting httpd: [FAILED]

Similarly, the error in Nginx will appear as

nginx: [emerg] bind() to X.X.X.X:80 failed (99: Cannot assign requested address)
Starting nginx: [FAILED]

Here, our Support Engineers had to manually change the old IP with the new IP address.

 

[Having trouble while changing the IP address in VestaCP? We’ll fix it for you.]

 

Conclusion

In short, VestaCP IP address change involves an update in both VestaCP and web server configuration. The need for IP change arises during server migration or when the current server IP address gets blacklisted. Today, we saw how our Support Engineers changed the IP address in VestaCP and fixed related errors.



Source link

Author

Write A Comment