Create account with different home directory?

ca2236

Well-Known Member
Feb 2, 2018
244
25
28
Nebraska
cPanel Access Level
DataCenter Provider
Hello,

I need to create a new domain and have it point to a subfolder of a related account. I do not want to redirect because that will change the URL to the new domain. This isn't what I want.

I want to be able to change the /home directory or document root so that the URL stays the same. I know this can be done via the httpd.conf file, however, I think this would be over wrote during an update possibly? Since I would have to manually edit the httpd.conf.

Another thought is to modify the home directory in the password file. Are there any pointers you can give?

Thanks
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,772
326
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
I would set it up as an addon domain as you can set the document root to anywhere in the same account.

I don't know of a way to do this as a separate stand alone account.
 

ca2236

Well-Known Member
Feb 2, 2018
244
25
28
Nebraska
cPanel Access Level
DataCenter Provider
Hi GOT,

Thank you for taking the time to reply. :)

I know this can be done on a non cpanel server. However, this won't allow for two separate SSL's since both domains exist on the same account.

the setup is:

domain.com -> has an ssl
subdomain.domain.com -> added as a subdomain, but no SSL. I need it to have an SSL as well.

cPanel will not let you add two separate SSLs to the same domain. I tried to break out the subdomain, but this won't work as I can't do a redirection, it has to use the subdomain.domain.com as the URL.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,772
326
363
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Well, I have seen someone create an account in the normal way, then remove the public_html and create it as a symlink to the other account folder that is to be the docroot. You're going to run into ownership and permission issues and apache can only run php in certain ways that will allow this. It will be a challenge but it could potentially be done.
 

ca2236

Well-Known Member
Feb 2, 2018
244
25
28
Nebraska
cPanel Access Level
DataCenter Provider
Update: I just tested this, apparently if your account has a subdomain, you can upload two different SSLs. However, it seems if you have one domain parked on another

domain2.com is parked on domain1.com, then it won't work.


this is resolved
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,300
363
Houston
Hi @ca2236


Glad to hear that it's resolved thanks for updating us. I will point out that custom home directories are not something that is inherently supported by cPanel. For parked domains, it is possible to have AutoSSL on both the parked domain as well as the original domain, especially with AutoSSL where it can be the same certificate with both domains listed as SAN's