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=1831 FWDa3cvG1hKlkjzlABjai_DYEZ6zYKx9NatZUrTbQdlZNUkoFas3H_ZhAtvxVLCy 647bcaf783ecadb7b14eb1dea974992c66e6eeb4&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1836 fiYfH9yUuGpq_c50jkoyewCarfqZWKm9RB3MDjSLiCnegPqYw8wxGHDKb6UJYu3k 130b1eb433d7680a8e067241ea0c881e4235bfb9&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1836 8o51unT9yYbAGckufIrGZQy_Rt_atV8GjarHNl5MlKZQdOllInFX6bfA6_Jc8pcr 759ed686cf052b2fb3415c936bdad3031aa8f445&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1835 LtMv4MmSdU9cF6BpFQpQHHNDwy9IIq1tF52M8FZurDHUwEAGVG7g4Ak2mmIdZuKc 4dd21af9824151626773ba1c062eac881a2f3481&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1834 NvzcVedXHOhMujhfg3155F_ktHcXzv1pxM0uWUErW1lOkUq6aUX92TP3-dBrf92b ec83667c5c94828c3d30cda95d3566ac615ab0a7&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1834 NJVcS54FOpkpN6MoZOQQRD8WZombEwxGYINsx28GavMb5lvYxKtifCLzhcyq-vhR 7fcca918b7adff3dd813a6f5c4189637b2afee12&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1834 bGeNkavRDNN5uJMLu2aaYK547zRvc40d_sG6kK8tFl_aX1K5i7eqGo6RoH9NRMlz 0a04b2694afd6a7dff60d7cb47f9e5bac6fda253&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1833 gD0fnpZQXMVhi-WnAsob7dXWZ3gzWK0AJwZ7P4-0EH25mqLW1q8sXheSugMrMedn 1d03278b7f0cb85fea68e833721350c22bfa1090&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1833 A5y79lmwf80hjid4pvqE612rPZD_VVse1U8lswq9nvd3gokwpwCuB2qIBiliPoKN 808dbaa43f3b804c1894a5730fba1dd0790074eb&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
  • https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1832 LsHTli62JQceGlc5O4vaHNMdya-gCwjGQrEz6Oh4zmw4RcMfvxy6D7O2k-L0oBJf d5b84e17ff856336a5e5e0f5cebd3a1078411194&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme

Leave a Reply