Posted by Vanessa | Posted in Misc | Posted on June 4, 2010
2
There may come a point in time where you need to change the shared IP address of a server, with little to no interruption in service for your users.
This guide will show you how to change the shared IP of your cPanel server with the method I’ve used in the past. This is intended for intermediate to advanced administrators that have some basic knowledge of cPanel and networking. This will only update the main IP of your server, and will not affect accounts that have dedicated IPs or SSL certificates.
Posted by Vanessa | Posted in Misc | Posted on May 14, 2010
0
By default, cPanel supports the usage of one dedicated IP per account. However, you can get around this by editing just a few files on the server. Here are the steps:
1. Edit /var/cpanel/userdata/$USER/$SUBDOMAIN.$DOMAIN for each subdomain (for addon/parked domains you’ll usually edit the file for the subdomain associated with the addon/parked domain) and change the ip value to a ‘dedicated’ ip.
2. Run /scripts/rebuildhttpconf
3. Edit the dns zone for the subdomain (which will likely be attached to the parent domain) and update the a-record to point to that IP as well. Then syncronize the zone out to the DNS cluster, if one exists:
/scripts/dnscluster synczone <parentdomain>
4. Edit /etc/domainips and add an entry for that sudomain to point to the IP and run /scripts/rebuildippool to make sure the IP is marked as taken.
Posted by Vanessa | Posted in Misc | Posted on April 7, 2010
4
There are three ways to change a site’s IP address on a cPanel server:
Via WHM:
Go to WHM > Change site’s IP Address , select the account, then select the IP
Via Command Line:
/usr/local/cpanel/bin/swapip <oldip> <newip> <newftpip> <domains>
*I’ve heard on some servers that this doesn’t completely switch the IP in the Apache configuration
Manually:
-Edit /var/named/domain.com.db and increment the serial number. For help in changing DNS, see this post
-Replace instances of the old IP with the new IP in /var/cpanel/userdata and /var/cpanel/users
replace 123.123.123.123 222.222.222.222 — /var/cpanel/userdata/user/*
replace 123.123.123.123 222.222.222.222 — /var/cpanel/users/user
-If the new IP is shared, remove the user’s main domain entry from /etc/domainips. If it’s a dedicated IP, add/change the IP in /etc/domainips and /etc/ssldomains (if the site has an SSL)
-Run /scripts/rebuildhttpconf and /scripts/rebuildippool
Posted by Vanessa | Posted in Misc | Posted on December 28, 2009
0
In a hosted multi-site environment you may find yourself needing to add multiple IP addresses to a server. Luckily, cPanel makes it very easy to add IP addresses. This article will go over adding IP addresses to standalone servers, both through WHM and from command line on a cPanel server.