VestaCP: How to change IP Address


Step 1: go to folder /etc/nginx/conf.d/ you will see the file oldip.conf like 23.227.177.193.conf with content:

[root@tutorialspots ~]# cat /etc/nginx/conf.d/23.227.177.193.conf
server {
    listen       23.227.177.193:80 default;
    server_name  _;
    #access_log  /var/log/nginx/23.227.177.193.log main;
    location / {
        proxy_pass  http://23.227.177.193:8080;
   }
}

vestacp nginx conf

You must make new file: newip.conf like 111.111.111.111.conf with content

server {
    listen       111.111.111.111:80 default;
    server_name  _;
    #access_log  /var/log/nginx/111.111.111.111.log main;
    location / {
        proxy_pass  http://111.111.111.111:8080;
   }
}

and delete the old file: oldip.conf.

Step 2: restart nginx

service nginx restart
[root@tutorialspots /]# service nginx restart
Stopping nginx:                                            [  OK  ]
Starting nginx:                                            [  OK  ]

Step 3: go to folder /etc/httpd/conf.d/ you will see the file oldip.conf like 23.227.177.193.conf with content:

[root@tutorialspots ~]# cat /etc/httpd/conf.d/23.227.177.193.conf
NameVirtualHost 23.227.177.193:8080
Listen 23.227.177.193:8080
NameVirtualHost 23.227.177.193:8443
Listen 23.227.177.193:8443

vestacp httpd conf

Note: with debian or ubuntu you must go to folder /etc/apache2/conf.d

You must make new file: newip.conf like 111.111.111.111.conf with content

NameVirtualHost 111.111.111.111:8080
Listen 111.111.111.111:8080
NameVirtualHost 111.111.111.111:8443
Listen 111.111.111.111:8443

and delete the old file: oldip.conf.

Step 4: replace oldip by newip in all .conf files in /home/

cd /home/
find . -name "*.conf" -print | xargs sed -i 's/23.227.177.193/111.111.111.111/g'

Step 5: restart apache

service httpd restart

Done!

Recent search terms:

  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1837 EBVOqzn2E_-KaiHMeR1LdY-pZfAnC1aCiJBu852GTkDXyObzc9i48CI_NjySWAjn 3909b152086fe0b38f58144de3d63f69ba086077&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1829 Gzy-YIHDNa-z7XYe7P1dIY7xDPT6KqL4RJk9qXbOpn5LWrCrucFpHgQXsH6Wk_zA a5d547e36d4cbe3190d595ab9b3f36b2f6138e64&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1828 YY2dp7LZiE5VatpuVtNxQL7E45YE_3X4Pin-G1QwHEc8Y3svEko1BnA_Jp7Mb1rM 63d30ffb34682129693d797b8038f15a04c91550&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1828 OaCU93Q0d6XGetKcBmRXwxiEsR_1bRJ36_9iNthMNzN58NfJ6kMaQlrG1vpBYZX2 ecf5461c82bbeee1dfdf7cd8ef55e758904c2bb9&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 sqdDokvI4dtyk_W9sG1VuWKJA9Dp36Y9Pb2PYfhGwUYk4WHO--wuXZx4Se6TLqyY beeca900b41f5c82aca160f5282cc1b695d29704&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1826 UdaK97LXRW2JMM2lIxsfhu8UFunwAEFjv1MYm8XYV7_ih4X_sRDVpb7GjhhFqaHQ 7886b84ed213dea9f4ce039e016ef4ca550ace9a&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1825 nzhu08AqsxdlutwRNxuSlOljBJoNzdUwc1d35xJU5jaqYi3cQ3ZMvAcbmvyVx_OF 88e0102f3d564770a1b30ad42f9c41fb766d2b97&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1825 1-uslRNswbGS6weM-C8BT0oic_T_m9VtIRDWmVzGLKKMW6glQesNB-jpg2Dxs9Ml d073108a7ca4144b77ce4944e12668e6b0dc3665&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1824 n7szkAcQcjcMxXMqr1YYLMfKznfmAs92-Ut8J5KLrHwqj_1S-mS1Z-J8qUnWyW5_ 0053cd4094bc53c555a9d109d5e1db5ce98416f3&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1821 MAbz4zuOIzJ7d5buI0aHaOtalMVvStQIfZYTpSICKDZ8A6_nDAyo7_23KXLPRHLj 329a51b93277227544c8e9eb0f19de65395771fc&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme

Leave a Reply