Specify IP address using remote API : edit : (solved)


we are using the remote API a lot. I do have a problem with the create-domain.

In the api call, we pass the --shared-ip parameter to specify under which ip address we want the virtualhost to be created.

For the moment being we only have one shared ip address, which is the “Default shared address” in the “addesses and networking” module. But we will have more, this is why we specify the ip address in our code.

But when I run the command with --shared-ip I get the following error:

Virtualmin API error : xx.xx.xx.xx is not in the shared IP addresses list

Is it because we currently have only one ip address ?

I’ve managed to add other ip adresses as shared, so in the box of “address and networking”

It’s working with the adresses in the box (Shared addresses for any servers) but doesn’t work with the default (Default shared address)

How come ??

Well, if you use the default Shared address, you must not specify it in the api call.

You use the --shared-ip ONLY if you want to set an ip address which is not the default !

Thank you

I’m glad you got that all figured out, thanks for letting us know how you did it!