Featured Posts

Tips to Reduce Your Customer Support Costs When hosting websites, whether as a mainstream hosting provider, a hobby, or to supplement another service, it's your job to make sure your customers have access to technical support in case they need...

Read more

Roundcube: MySQL or SQLite? cPanel 11.25 introduces a new feature: The ability to have RoundCube use SQLite instead of MySQL. After benchmarking resource usage and performance, I've come to the conclusion that SQLite is definitely...

Read more

Simple Bash Script to Fix Account Permissions This is a simple bash script I wrote to fix the permissions and ownership of files within a cpanel account. To use, simply copy the script your server, chmod 755, and pass the usernames as arguments: ./fixperms...

Read more

Re-Installing Auxiliary cPanel Software Cpanel has a lot of supporting software that you may be using on your server. In case something goes amiss, here is a list of scripts that reinstall cpanel-provided software on your system. For most all...

Read more

10 Free Monitoring Solutions to Consider Server and network monitoring can be crucial to a host's success. I mean, how embarrassing is it when your customers are aware of downtime before you are? You don't have to pay big bucks or spend loads...

Read more

The cPanel Admin Rss

Changing the Shared IP Address of a Live Server

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.

Assign Multiple IP Addresses on One Account

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.

Changing a Site’s IP Address

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

Adding IP Addresses to a Server

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.