+1 vote
in Web & Google by (13.6k points)

I migrated my VPS to a new host and hence got a new IP address. However, both Apache and Nginx are not running and when I tried to restart Apache, I got the following error: 

May 11 19:58:22 test.servername.com systemd[1]: Starting The Apache HTTP Server...

May 11 19:58:22 test.servername.com apachectl[8943]: (99)Cannot assign requested address: AH00072: make_sock

May 11 19:58:22 test.servername.com apachectl[8943]: no listening sockets available, shutting down

May 11 19:58:22 test.servername.com apachectl[8943]: AH00015: Unable to open logs

May 11 19:58:22 test.servername.com apachectl[8943]: Action 'start' failed.

May 11 19:58:22 test.servername.com apachectl[8943]: The Apache error log may have more information.

May 11 19:58:22 test.servername.com systemd[1]: apache2.service: Control process exited, code=exited, status

May 11 19:58:22 test.servername.com systemd[1]: apache2.service: Failed with result 'exit-code'.

May 11 19:58:22 test.servername.com systemd[1]: Failed to start The Apache HTTP Server.

I am using Vesta Control Panel on my VPS and it shows the old IP address. How can I change the IP address?

1 Answer

0 votes
by (21.4k points)

It's very simple to update the IP address if you are using VestaCP. Since MyVestaCP and HestiaCP are a fork of VestaCP, the following commands should also work for those control panels.

Log into your VPS as "root" and run the following commands on the terminal.

  • # v-update-sys-ip NEW_IP_ADDRESS
If the above command does not work, try the following:
On vestacp and myvestacp:
  • # /usr/local/vesta/bin/v-update-sys-ip NEW_IP_ADDRESS

On hestiacp:

  • # /usr/local/hestia/bin/v-update-sys-ip NEW_IP_ADDRESS
The above command will update the IP address of the server, Apache, Nginx and others.
Now run the following commands to make your server live:
  • # service vesta start
  • # systemctl restart nginx.service
  • # systemctl restart apache2.service 
...