How to Change IP Address in VestaCP ?

Selim Emre Toy
Feb 9 · 1 min read

Solution 1:

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

1) run instruction from first post

2)
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”

3)
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

4)
set new public IP in NAT Vesta control panel

5)
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

Selim Emre Toy

Written by

http://www.selimemre.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade