i guess this kind of a short howto is missing for i-mscp. So I decided to write a short howto on the forum.
Mostly for people who don't know what ispcp was and are looking for a solution in i-mscp
First change IP address in /etc/imscp/imscp.conf
and replace the old IP address with a new one:
then, stop the i-mspcp daemon:
Now we need to change the IP address in database.
Also we need to change the domain status from 'ok' to 'changed' so that the IP address will be replaced by a new one for all
domains, subdomains and aliases.
Login to mysql and switch to i-mpscp database(you can also do it via phpMyAdmin):
now change the IP addres and the domain status:
- UPDATE server_ips SET ip_number = "new_ip" WHERE ip_id = 1;UPDATE `domain` SET `domain_status` = 'change' WHERE `domain_status` = 'ok';UPDATE `subdomain` SET `subdomain_status` = 'change' WHERE `subdomain_status` = 'ok';UPDATE `domain_aliasses` SET `alias_status` = 'change' WHERE `alias_status` = 'ok';UPDATE mail_users SET status="toadd" where status="ok";
Now we need to update the domains config and status, run:
We can start i-mspcp daemon:
Last thing we need to do is to modify the IP address in Apache and Bind configuration files, basically we need to replace the old IP address with a new one.
This can be done with the simple sed onliner bellow (just replace the word oldIP with old IP address and newIP with the new IP address):
Restart apache and bind:
And that's it.