An addon domain is a domain name that that points to a subdirectory within your account. For example, you may want innovation.org.nz to point to business.org.nz/innovation/. Addon domains must be registered domain names that you own and configured to point to your web site's servers.
To add a domain to your web site:
1.Click on the Addon Domains button on the home page.
2.Enter the domain name in the New Addon Domain field.
3.Add the directory that the addon domain points to in the Username/directory name field.
4.Enter the password for the domain in the Password field, if required.
5.Click on the Add button.
<VirtualHost IP>
ServerAlias www.addon.maindomain.com
ServerAdmin webmaster@addon.maindomain.com
DocumentRoot /home/cpaneluser/public_html/addon
BytesLog domlogs/addon.maindomain.com-bytes_log
ServerName addon.maindomain.com
ServerAlias addondomain.com www.addondomain.com
User cpaneluser
Group cpaneluser
CustomLog /usr/local/apache/domlogs/addon.maindomain.com combined
ScriptAlias /cgi-bin/ /home/cpaneluser/public_html/addon/cgi-bin/
</VirtualHost>
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
subdomain entry in db file
addon 14400 IN A IP
www.addon 14400 IN A IP
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
creation of addon manually
1. remove the entries of the addon entries from the following files
/var/cpanel/users
rm -f /etc/valiases/addondomain
rm -f /etc/vfilters/addondomain
check the entries in httpd.conf
rm -f /var/named/addondomain.com.db
2. /scripts/updateuserdomains
3. through cpanel create the subdomain
4. /scripts/adddns addondomain.com
ip of the maindomain
5. add the entry in the httpd.conf
<VirtualHost 66.118.171.130>
ServerAlias www.jewel.timansley.com
ServerAdmin webmaster@jewel.timansley.com
DocumentRoot /home/timansle/public_html/jewel
BytesLog domlogs/jewel.timansley.com-bytes_log
ServerName jewel.timansley.com
ServerAlias jewelholdings.com www.jewelholdings.com
6. restart named httpd
7. touch /etc/valiases/addondomain
8. chown user.mail /etc/valiases/addondomain
9. chown user.mail /etc/vfilters/addondomain
10. /scripts/updateuserdomains
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
error
addon domains are not appear in add mail account screen
solution
Check /var/cpanel/users/username for the appropriate entry for the addon domain.
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&