(Sub)domain -> directory

luckdragon

New member
Joined
Oct 31, 2008
Messages
3
Hi

i currently use cpanel for our servers but it is too expensive for a new project i am working on at the moment so i am looking into alternatives. DA seems to be growing in popularity however i need some very specific functionality and was wondering if this is possible with DA.

The project i am working on will need to use a PHP Api to execute certain DA functions. To be more precise i need to do the following:

The project is located here:
/home/project/

within the project there are several accounts, these accounts are stored here, each account in its own directory:

/home/project/public_html/accounts/accountid/

the accounts are created from within the project with php, on creation i need to also create a subdomain that links to the project directory like this:

accountid.project.com -> /home/project/public_html/accounts/accountid/

i also need to be able to attach domains in the same way like this:

www.accountid.com -> /home/project/public_html/accounts/accountid/


in cpanel i call the addon-domain function from php which allows me to pass a new (sub)domain, a main domain to hang it on and a directory that it links too.

is there a php api for DA that would provide the same functionality?

Thank you
 
1 account

would it be possible to change the directory it makes subdirs at on the software level? because this directory will be pretty much the default for this server, so could it be hardcoded into the DA software that all subdirs are made at /home/project/public_html/accounts/ ?
 
I dont think you can change the directory. Someone please correct me if I am wrong.

But as a developer, you should have the ability to think of many alternative ways to achieve the same result.

eg.
1, User submit the form or whatever
2, Create the directory on your own, ie public_html/accounts/peter;
3, Create a symlink in public_html linking to the directory in #2
4, Connect DA API and create the subdomain
 
messy

i was looking at this method too but it makes my directory structure messy, with all kinds of double folders and such. as i expect to be making over 100 subaccounts i would rather keep them all seperate in a directory. If DA cant do it i will just have to raise the budget and go with cpanel.
 
Back
Top