|
Aside from some for the more standard functionalities, cPanel provides you with visual, in-browser access to some more complicated tasks. We've outlined procedures below for a few of the advanced functionalities available, to give you an idea of how certain tasks are easily handled. Resellers If you are a reseller, the cPanel main page should have a link to WebHost Manager (WHM). WHM is indispensable for those who re-sell space from hosting providers, who share hosting with others, or who simply want to separate their web properties into multiple cPanel accounts. In WHM, you can specify the information (login info, skins available, and so on) and limits (disk space, bandwidth, number of domains allowed, and so on) on specific accounts. If enabled, you can also do things such as edit DNS records through the WHM interface – doing so on the command line would involve complicated syntax and the risk of messing with files.  To edit the limits on an existing cPanel account, you would follow this procedure: 1. Either log in to WHM directly, or first log in to your main cPanel account, then click the WebHost Manager icon.  In WHM, cPanel accounts are assigned "packages", so that you can potentially put the same limits on multiple cPanel accounts quite easily. Click on the Edit Packages link on the left menu of WHM. Alternatively, click on the Packages icon, then click on the Edit Packages link in the main area of WHM. 2. On the Edit Packages page, select the package you wish to edit, then click the Edit button. 3. Edit the values on the form that loads to specify the maximum disk space, bandwidth, number of FTP and e-mail accounts, number of databases, number of domains and sub-domains, and more. Then, click the Save Changes button. The account(s) for which this package applies now has some updated limits. If this applied to your main cPanel account as well, you can return to cPanel to verify the new limits. IP blocking Is a specific IP always spamming your server or do you have a recurring, disruptive visitor? While there are alternatives such as conditional statements in your PHP files, and rewrite rules in .htaccess files, in cPanel, you can block specific IP addresses from accesses any of your sites under an account. To do so, first click on the IP Deny Manager icon on the cPanel main page. Then, enter the IP you wish to block in the text field and click the Add button.  Read the instructions for examples of more complex IP blocking. You can also view a list of IP addresses that are currently being blocked, and unblock certain ones if necessary. Cron jobs Cron jobs are used to automatically run scripts at certain times of the day, or at set intervals. This is useful for tasks such as file cleanup, importing external information, and backups.  Suppose you have a site that takes subscriptions, and you have created a script /home/yoursite/notify.php that e-mails reminders whenever people have subscriptions coming due. If you want this to run every day, you can configure this in cPanel: - Click the Cron Jobs icon in the cPanel main page.
- Click the Standard button (you can of course alternatively click the Advanced button).
In the text field near the top of the page, enter an e-mail address that should receive the output with either errors or the successful output of the script. Note that this is different than the addresses of the reminder recipients. - In the "Command to run" field, enter something like php /home/yoursite/notify.php – this runs your script using PHP.
- In the Minute(s), Hour(s) and other selectboxes, specify a frequency with which the command should be run. For example, to run the script at 3:25am ever day, select "25" in the Minute(s) field, "3 = 3 AM" in the Hour(s) field, "Every Day" in the Day(s) field, "Every Month" in the Month(s) field, and "Every Week Day" in the Weekday(s) field.
- Click the Save Crontab button and later verify that the script was run (by checking the supplied e-mail address or by checking a test e-mail address that should have received the reminder.
Directory index protection If you do not have a file such as index.php or index.htm in a publicly accessible folder, by default many servers display a list of the files in that folder when the folder is accessed. To prevent the list of files from being shown, first click the Index Manager icon in the cPanel main menu. Then, navigate your directory structure by clicking on the folder icons.  When you have found the desired folder, click on its linked name. On the resulting page, you can specify via radio buttons whether you want to prevent the display of the files in the folder, display a simple list of the files, or display a fancier list with graphics. Then, click the Save button. Password protection Sometimes you just want to add simple username / password protection to access sites and directories, without complex user account and session functionality. HTTP authentication managed through cPanel does the trick. When this is set up and someone tries to access a protected directory, a standard, pop-up login form is displayed:  Setting this up is similar to setting up directory index protection. First, click the Password Protect Directories icon on the cPanel main page. Then, navigate your directory structure by clicking on the folder icons. When you have found the desired folder, click on its linked name. On the resulting page, first create a user in the form at the bottom.  Then, you can mark the checkbox to password protect the directory, specify a name that will be used to refer to the protected area, and click the Save button.
|