How to create an alias to an existing domain with API / cli ?

I can't get this command work... Any tips ?

virtualmin create-domain --alias myalias.domain.com --domain example.com

Documentation explain a bit, but there isn't exemple : https://www.virtualmin.com/documentation/developer/cli/create_domain

thanks !!

Status: 
Active

Comments

Howdy -- when running that command, when it doesn't work, it would return an error message at the top of all the output.

In this case, the error message would have been:

No virtual server features enabled

That means that Virtualmin doesn't know which features to use. What you could do is pass in the --web feature to enable the website for that alias.

It looks like you're using Virtualmin GPL there though, if you had any followup questions, and you're using Virtualmin GPL, you'd actually want to use the Forums for support. We monitor those, along with lots of wonderful folks in the community. Thanks!

THANKS !

Indeed this command works well :

virtualmin create-domain --alias myalias.domain.com --domain example.com --web

I will share it again on the forum.

Sorry for this Issue, this interface it's a bit confusing between Issue and forum... Now I've got it ;-)

creating a domain alias does not work

I am trying the following:

virtualmin create-domain --alias carlos4.midominio.com --domain midominio.com --web virtualmin create-domain --parent midominio.com --alias carlos4.midominio.com virtualmin create-domain --parent midominio --alias carlos4.midominio.com

Ilia's picture
Submitted by Ilia on Thu, 09/03/2020 - 13:19

creating a domain alias does not work

Please try the following instead (reversed):

virtualmin create-domain --alias midominio.com --domain carlos4.midominio.com --web