Author Topic: CWP api admindomains add subdomain  (Read 756 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
CWP api admindomains add subdomain
« on: April 14, 2020, 07:53:47 AM »
I`m trying to add a subdomain to an existing user using the api /v1/admindomains post action from php.
everything seams to work fine but my apache Vhost is generated with the relative path.

so when i call the api with "path"=>'/public_html/test" my test subdomain gets generated, ssl is generated, folder /home/testuser/public_html/test is generated, the cwp db is updated ok, in the cwp admin > list subdomains the path is /home/testuser/public_html/test, but in my vhost DocumentRoot is "/public_html/test".

If i pass the entire path "/home/testuser/public_html/test" the new folder is created in "/home/testuser/home/testuser/public_html/test"

If I add it from the admin interface the paths are all ok.
I checked the vhosts template is the same for both api and web interface, "DocumentRoot %docroot%".

Any ideas ?

Thank you.