How to Change IP Address in VestaCP ?

Solution 1:

xx.xx.xx.xx — old private IP
yy.yy.yy.yy — new private IP

1) run instruction from first post

grep -r “xx.xx.xx.xx” /etc/
grep -r “xx.xx.xx.xx” /home/
grep -r “xx.xx.xx.xx” /usr/local/
and replace all “xx.xx.xx.xx”/”xx-xx-xx-xx” on “yy.yy.yy.yy”/”yy-yy-yy-yy”

rename files
/etc/apache2/conf.d/xx.xx.xx.xx.conf in yy.yy.yy.yy.conf
/etc/nginx/conf.d/xx.xx.xx.xx.conf in yy.yy.yy.yy.conf

set new public IP in NAT Vesta control panel

restart server

And may be you need change public IP on WEB and DNS sections in Vesta control panel

Solution 2:

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

v-change-server-ip OLDIP NEWIP

Written by

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store