Author Topic: CWP api admindomains add subdomain  (Read 1768 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.

Offline
*
Re: CWP api admindomains add subdomain
« Reply #1 on: February 10, 2021, 05:50:24 PM »
I am facing the same issue on my end whenever a subdomain is created from api subdomain shows following error:

Not Found

The requested URL / was not found on this server.

when subdomain is created with API its Document root in vhost is set /public_html/subdomain/sub.domain.com while it should be /home/user/public_html/subdomains/sub.domain.com .. and upon restarting apache I  get following warning: AH00112: Warning: DocumentRoot [/public_html/subdomains/testing/] does not exist