This function creates a subdomain.
document_root required | string The subdomain's document root within the home directory. Note:
Example: document_root=public_html/directory_name |
domain required | string <domain> The subdomain name to create. Example: domain=subdomain.example.com |
use_canonical_name | integer Default: 0 Whether to use a canonical name in the Apache® configuration for self-referential URLs.
Example: use_canonical_name=0 |
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ create_subdomain \ domain='subdomain.example.com' \ document_root='public_html/directory_name'
{- "data": {
- "username": "example"
}, - "metadata": {
- "command": "create_subdomain",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}