Introduction
Creating an addon domain from the command line involves parking the new domain on a subdomain. If the subdomain on which the new domain will be parked doesn't exist, the subdomain must be created first.
Procedure
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command to create the subdomain on which to park the new domain, if the subdomain doesn't exist on the server.
whmapi1 create_subdomain domain='$newdomain.tld.$domain.tld' document_root='public_html/$newdomainfolder'
Please note that "$newdomain.tld", "$domain.tld", and "$newdomainfolder" must be replaced with the domain name to add, the primary domain on the account, and the folder name in which the new domain's site content will reside. - Run the following command to park the new domain on the desired subdomain.
whmapi1 create_parked_domain_for_user domain='$newdomain.tld' username='$username' web_vhost_domain='$newdomain.tld.$domain.tld'
Please note that "$newdomain.tld", "$username", and "$domain.tld" must be replaced with the domain name to add, the username of the account on which to add the new domain, and the primary domain on the account.
Comments
0 comments
Article is closed for comments.