If you run multiple domains on ispCP and you want to run some domains on a different IP address, here’s how you do it.
Adding the IP in the admin console
Log in to your ispCP admin account. Navigate to
Settings –> Manage IPs
Add the new IP address and the domain you’re intending to use it for.
Mapping the IP to the domain
This must be done manually. Log in via SSH to your server. Connect as root user to your MySQL console using
mysql –u root –p
You need to enter your mysql root password now. If you don’t remember it, you might be able to recover it. Once logged in, list all your databases using
show databases;
Identify the ispcp database, mine was named “ispcp_database”. Then, select that database
use ispcp_database;
If your ispcp database is named differently, replace “ispcp_database” with your name. Next, list the domain / IP mapping
select domain_name, ip_number FROM domain d RIGHT JOIN server_ips ip ON d.domain_ip_id=ip.ip_id;
You’ll see a list of all domains now and their IP addresses. You should have the domain name NULL mapped to the newly added IP. This means, that there is no domain assigned to it, yet. To assign the domain, run the following query
update domain SET domain_ip_id=(select ip_id from server_ips WHERE ip_number="1.2.3.4"), domain_status="change" where domain_name="example.com";
Replace the red strings with the IP address and the domain name you’d like to assign. To double-check that it worked correctly, list all assignments with the following query
select domain_name, ip_number FROM domain d RIGHT JOIN server_ips ip ON d.domain_ip_id=ip.ip_id;
Exit MySQL.
The next step will overwrite the ispcp configuration and all custom changes it might include. Please backup your ispcp.conf before proceeding. When done, run the update script
cd /var/www/ispcp/engine/setup/
perl ispcp-update
Keine Kommentare:
Kommentar veröffentlichen