There is an error in Cpanel hosting server that cause Add-on domain is not working properly.
Here is a various symptoms:
* When user adding add-on domain and delete it and then re-adding it again, it will show error
* Or if the domain to be added was a single user account on the same server (even after being terminated) it cant be added
* Add-on just disappear after CPANEL update
The fastest solution is :
Login into your Cpanel server with root access.
We will have an example domain name : testing.com that have a problem with add-on domain.
Look at this files or directory and cleanup or fix :
* File /var/cpanel/users (find : testing.com user and delete it)
* Directory /etc/valiases (find : testing.com and delete it)
* Directory /etc/vdomainaliases (find : testing.com and delete it)
* Directory /etc/vfilters (find :testing.com and delete it)
* File /etc/named.conf ( find : testing.com and delete it)
* Directory /var/named (find : testing.com.db and delete it)
* File /etc/httpd/conf/httpd.conf (find : testing.com and delete it)
After we’ve clean up, we need to make sure restarted the HTTP and BIND services.
Restarting Services
$/sbin/service named restart
$/sbin/service httpd restart
Login into your Cpanel
Click on Addon Domains
Create a new Addon Domain There.
This should fixed the Cpanel Addon domain problem
Cpanel Basics
The IP Deny Manager enables you to block access to your website from specific IP addresses. This is useful to remove nuisance surfers who use a large amount of bandwidth or to prevent hotlinking to your site (refer to HotLink Prevention for more information about hotlinking).
To add an IP address to the IP Deny Manager:
- Click on the IP Deny Manager button on the home page.
- Enter the IP address that you want to block in the IP Address field.
- Click on the Add button.
cPanel Tutorials
The Index Manager enables you to control how directories on your web site are displayed. If there is no index.html in a particular directory, the contents of the directory will be displayed to the browser. This is usually undesirable and can cause security issues. You can set the four different options for any directory through the Index Manager:
- Default System Setting - Use the system setting for your hosting machine. This is set for all directories by default.
- No Indexes - Do not use any indexes. Any browser that accesses this directory will see a list of all files in the directory.
- Standard Indexing (text only) - Prevents browsers from viewing the contents of this directory. The browser receives a 403 (Forbidden) error. This option should be used for directories that do not contain image files.
- Fancying Indexing (graphics) - Prevents browsers from viewing the contents of this directory. The browser receives a 403 (Forbidden) error. This option should be used for directories that do contain image files.
To change index settings for a directory:
- Click on the Index Manager button on the home page.
- Navigate to the folder that you want to alter and click on its name.
- Click on the radio button next to the option that you want to use for this folder.
- Click on the Save button.
cPanel Tutorials
Hotlinking is when another web site owner links directly to one or more of your images or multimedia files and includes it on their web page. Not only is this theft of your intellectual property, you are paying for the bandwidth used by that site. Refer to this article for more information on hotlinking.
CPanel can prevent hotlinking by only allowing named sites (such as your own web site) to access files on your site.
To prevent hotlinking:
- Click on the HotLink Protection button on the home page.
- Enter any other addresses that you will allow to access your site other than the provided defaults in the central area.
- Enter the protected extensions in the Extensions to allow field. Make sure you separate each extension with a comma.
- Enter the address to redirect any hotlinking to in the Url to Redirect to field.
- Click on the Allow direct requests tick box if you want to allow direct URL access to non-HTML files, such as images.
- Click on the Activate button.
cPanel Tutorials
Cron Job:--------
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
cPanel Tutorials
Cron jobs allow you to automate repetitive tasks on the server that hosts your web site. This is a powerful tool that allows you to take a hands-free approach to repetitive tasks. For example, you could add a cron job that automatically copies a MySQL database to a separate location on your site as a backup.
There are two different modes you can use to add a cron job:
- Standard - Provides a range of pre-set options that you can choose. This is the simplest method and is recommended.
- Advanced (Unix Style) - Provides the regular Unix style cron options. Recommended for users who are used to this method of entering cron entries.
Warning: You need to have a good knowledge of Linux commands before you can use cron jobs effectively. Check your script with your hosting administrator before adding a cron job.
To add or modify a cron job:
- Click on the Cron jobs button on the home page.
- If you want to use the Standard mode, click on the Standard button.
- Enter the e-mail address to send the results of running the cron job in the top field.
- Enter the command the you want to run in the Command to run field.
- Click on one option from each of the available lists.
- Click on the Save Crontab button. Your cron job has now been added or updated.
Note: You can always click on the Reset Changes button to change the cron job back to whatever it was before you started entering information.
cPanel Tutorials
The Redirects area allows you to redirect Internet traffics from one web page to another. This is usually used when a web page has been moved to another location.
To set up a redirect:
- Click on the Redirects button on the home page.
- Enter the address of the web page to move in the first field.
- Enter the redirection address in the second field.
- Choose one of the following options in the drop-down list:
- Temporary - This tells Internet traffic agents (browsers, search engines, etc.) that this is only a temporary redirection, and that they should return to this initial location again in the future for the same page.
- Permanent - This tells the Internet traffic agents to go to the redirection address in the future, as the old address will never be used again.
- Click on the Add button.
Cpanel theme X3 has options like Redirect with www and with out www etc ..
cPanel Tutorials
SQL stands for Structured Query Language. SQL is a international standard in querying and retrieving information from databases. MySQL is essentially an SQL server - it responds to requests for information that are written in SQL. You can communicate with MySQL using a wide variety of programming languages (PHP being one of the most common). MySQL is Open Source software and free for use.
To create a MySQL database:
- Click on the MySQL databases button on the home page.
- Enter the name of the database in the Db field.
- Click on the Add Db button. The database will be added to the /var/lib/mysql folder.
You need to create at least one database user and grant that user permission to use the new database.
To create a MySQL user:
- Click on the MySQL databases button on the home page.
- Enter the user’s name in the UserName field and the user’s password in the Password field.
- Click on the Add User button.
And then you have to add the user to database.
cPanel Tutorials
Error pages are served to Internet users when any one of a variety of errors occur, such as when a user enters an incorrect URL or is not authorized to access a specific directory in your web site. Companies often customize error pages to brand them with a specific corporate image and a link to their home page. You do not have to customize these pages - the error page is always available, whether customized or not.
Note: Custom error pages that are smaller than 10k in size will not display properly in Internet Explorer. Insert a large amount of text into a comment to create the required size.
To create or modify a customized error page:
- Click on the Error pages button on the home page.
- Click on the button of the required error page, such as the 403 button.
- Enter the HTML code for the error page. You can use the buttons at the top of the page to insert variables into the displayed code.
Example:
<h1>404 Not Found</h1>
<p>The requested page, <!--#echo var="REQUEST_URL" --> ,is not available.</p>
- Click on the Save button.
cPanel Tutorials
You can protect directories within your site from browsers by using a password to protect them. This allows you to restrict material to only authorized users or store sensitive material online. This has the same appearance and effect as the password protection on CPanel.
To password protect a directory:
- Click on the Password protect directories button on the home page.
- Navigate to the directory that you want to protect. Select a folder by clicking on the folder name link, or open a folder by clicking on the folder icon.
- Click on the tick box next to the
icon.
- Enter the name that you want to appear in the Protected Resource Name field. This is optional and purely for the user’s benefit.
- Click on the Save button. Generally, you now need to add at least one authorized user to enable access to the directory
cPanel Tutorials