cPanel account as subfolder of another cPanel account

StefT

Registered
Feb 20, 2019
4
1
3
UK
cPanel Access Level
Reseller Owner
Hi -

Probably seems like an odd question, but I'm looking to create a second cPanel user account which would appear as subfolder of a first cPanel account.

For example:
cPanel user account 1 = www.example.com
cPanel user account 2 = www.example.com/subfolder

For security, and redundancy reasons I'm trying to keep things as separate as possible, however from a web users perspective they need to appear to be part of the same.

In my scenario, I'm setting up an ecommerce store (cPanel user account 1), but also have an editorial site that needs to appear to be under the same domain (cPanel user account 2).

Obviously I could just use a subfolder in the first account and put relevant files in there, but I'd really like there to be two accounts (2 cPanels, 2 x ssh logins etc).

Whats the best way to go about this? I can't find an obvious solution. Should I set up the second account as subdomain but redirect it so it appears as a subfolder?

Many thanks
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,252
313
Houston
Hi @StefT


What you're requesting isn't possible for a couple of reasons but namely, because you can't have two separate cPanel users per account. You can most certainly create an addon domain or subdomain in a subfolder of the primary domain but this domain will not use a separate account.

I'm curious for more details about why you want this configuration, maybe we can help you come up with a workable and more secure solution.

Thanks!
 

StefT

Registered
Feb 20, 2019
4
1
3
UK
cPanel Access Level
Reseller Owner
Hi - thanks for your reply.

I'd guessed as much as couldn't find a solution myself.

My thinking was that if each install (ecommerce platform, and also Wordpress for editorial) were kept within separate accounts, (with different users, passwords, keys etc) then it would increase security and resilience.

For example, if somehow, someone gained access to one part (eg, the ecommerce platform) then they wouldn't automatically gain access to the other part and vice-vera.

Also if one part were to go down/offline for whatever reason, then the other part wouldn't be affected. It would have some built in resilience.

If I were to give a 3rd party developer SSH access, I would want to keep their access contained to the specific area.

Currently I have ecommerce solution installed in public_html and have a folder within there sym-linked to my Wordpress installed (in a folder in the top-level home folder. Does that make sense?

that gives me my directory structure:

e-commerce: mydomian.com
wordpress: mydomian.com/wordpress

With a bit of CSS the user won't be able to visibly see the difference between the two.

Just wondering that there must be a better way.... maybe not though?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,252
313
Houston
What you want as far as separation is definitely doable and youou could create them in different accounts like

domain.tld - account1

shop.domain.tld - account2

They don't actually have to be in the same account nor do they even need to share the directory structure.

this would keep them completely separate but when folks click to head over to the ecommerce portion they'd be rerouted to the shop.domain.tld site and vice versa. This would keep them separate but you just wouldn't have the subdirectory you're asking for, really that would be a security risk in of itself.
 

StefT

Registered
Feb 20, 2019
4
1
3
UK
cPanel Access Level
Reseller Owner
hey there - thanks for your reply, I understand the rational.
Initially we we were going to use sub-domains as you suggest.

However it's kind of out of my control as the preference from those around me is that the ecommerce section be up front and the rest of the site lie afterwards like 'shopdomain.tld/editorial' (no visible subdomain)

How about if the editorial was setup in a subdomain (as you suggest), but could it be redirected / proxied somehow with cPanel to appear not as a subdomain but following the desired url structure (i.e. shopdomain.tld/editorial)? Can that be done using cPanel?

Thanks again
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,304
1,252
313
Houston
That wouldn't work, you could redirect the subdomain to that folder but it would defeat the purpose of separating them out as the content for both would be contained in the same account.

So you can do what you want but not have separate accounts, you can limit access for dev's using FTP to specific folders as well, if you choose this path.

If you want to separate them you'd need separate domain names, hence the subdomains.
 

StefT

Registered
Feb 20, 2019
4
1
3
UK
cPanel Access Level
Reseller Owner
Thanks again.

Okay, I think I understand everything I need to - thanks for making it clear.

So it's either:-
I use a folder structure (everything in one cPanel account) OR I use a subdomain (and could use separate cPanel accounts).

I'm going to push for the subdomain option.

Cheers
Stef
 
  • Like
Reactions: cPanelLauren