Posts by b13n1u

    Hello,


    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


    find:
    BASE_SERVER_IP


    and replace the old IP address with a new one:

    Code
    1. BASE_SERVER_IP = [new_IP]


    then, stop the i-mspcp daemon:

    Code
    1. /etc/init.d/imscp_daemon stop


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

    Code
    1. mysql -u root -pUSE imspcp;


    now change the IP addres and the domain status:


    SQL
    1. 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:

    Code
    1. /var/www/imscp/engine/imscp-rqst-mngr


    We can start i-mspcp daemon:

    Code
    1. /etc/init.d/imscp_daemon start


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

    Code
    1. sed -i "s/oldIP/newIP/g" /etc/apache2/sites-available/* /etc/bind/* /var/cache/bind/* /etc/imscp/*/working/*



    Restart apache and bind:

    Code
    1. /etc/init.d/apache2 restart
    2. /etc/init.d/bind9 restart


    And that's it.