How to setup additional Domain with Its Own Directory

CScript

New member
Joined
Jan 24, 2020
Messages
8
In the process of migrating from CPanel to DirectAdmin, my website and all work necessary was done by my host.

I have since added a ‘new’ Domain, for a different website.

For this Question I will refer to the first website as: firstwebsite.com

And the additional as: secondwebsite.com

The directory for the first is: /home/firstwebsite/public_html

And the directory for the 2nd is: /home/firstwebsite/domains/secondwebsite.com/public_html

But I rather the directory for my ‘secondwebsite’ is: /home/secondwebsite/public_html

I was informed that I can do this by creating a NEW - FTP account with a ‘requested path’. In my attempt to do this I chose ‘custom’ but the directory offered indicates: /home/firstwebsite.

Needless to say, I did not go forward with this option but I am hoping someone can offer a solution. Thanks.
 
All domains are under /home/domains/domainname/public_html All of the them are set up that way. The public_html in /home/username/public_html is symbolic link to the "primary" domain. You can change the primary domain if you want.
 
I asked because I want to make sure that I don't encounter any issues if for any reason I decide to discontinue one domain, and delete all files.
Thanks for your follow-up.
 
All domains are under /home/domains/domainname/public_html
Wrong
All domains are under /home/username/domains/domainname/public_html
You are correct about the symbolic link though.

And the directory for the 2nd is: /home/firstwebsite/domains/secondwebsite.com/public_html
This would require a new account since all accounts start with /home/username/etc. to be precise.
However you add an just add an additional domain, it will be under:
/home/username/domains/secondwebsite.com/public_html

Via ftp you will have then:
/home/username/domains/firstwebsite.com/public_html
and
/home/username/domains/secondwebsite.com/public_html
as you can see they are seperate from each other, both reachable via the same FTP account.

Each domain is in principle completely seperate from the others EXCEPT for the database. So you can't have the same database name for different domains.
But also, be aware that you will be able to delete a database for secondwebsite.com from the firstwebsite.com domain in Directadmin vice versa.
 
Back
Top