remove subdomain via api
I know I can use /scripts/proxydomains --subdomain=whm remove to remove whm for all accounts or with --user remove it for one account.
Works fine and it seems also to make AutoSSL behave.
Is there any way to run this or a similar command via whm api?
Is it enough to just delete the subdomain whm using removezonerecord?
Will that do the same things as /scripts/proxydomains and also fix so no SSL certificate is issued or errors created from AutoSSL
-
Hey there! I just want to clarify our terms before we get to deep into this. Proxy Domains (now called Service Domains - Service and Proxy Subdomains | cPanel & WHM Documentation) are special redirects in the Apache configuration that allow whm.domain.com, webmail.domain.com, and cpanel.domain.com, to redirect to the appropriate ports on the system for those services. The DNS records for the actual subdomains do need to exist in order for the Service Domain redirect to work properly. If you delete the DNS record for a specific zone, it won't resolve to the server, so the Service Domain request wouldn't get triggered. I don't have an API call that will disable that. Does that answer what you're looking for? 0 -
Hey cPRex, Yes, I do understand the concept of service domains. We only use cpanel and webmail but unfortunatly there is no way to select what service domains to activate. It is all or none. So we use proxydomains script to remove whm webdisk etc to get r"rid of the ones we do not use We use whmapi for most of the things we do on the servers and now when we are moving lots of account it would be nice to also be able to remove the service domains we do not need via whmapi instead of via shell. So, is there any whm api support for this? Or is it enough to just remove them via removezonerecord ? 0 -
I would just use the removezonerecord for your situation. If you'd like to make a feature request to add more granularity on which service subdomains can be activated, you can do that using the link in my signature and I'll bring that up in next week's development meeting. 0 -
Thank you for your help with this A feature request maybe is a good idea so we can choose what proxy domains we want to use, since removing through removezonerecord or /scripts/proxydomains doesn't stop it from being recreated when doing a resetzone etc. 0
Please sign in to leave a comment.
Comments
4 comments