inteldigital

Well-Known Member
Apr 5, 2018
88
15
8
England
cPanel Access Level
Root Administrator
Twitter
Hello,

So basically I have WHM setup with / as the "Home directory" in Basic Setup. First of all, is this bad practice, if so, how do I resolve it? I changed it to that because I didn't like public_html/example.com and when I was adding new domains "addon domains" it was making them in public_html as well. So if I had wordpress in public_html, people were able to access an addon domain "example2.co.uk" by going to example.com/example2.co.uk ... which is not ok?

I run with Digital Ocean, my droplet has 25GB SSD which is enough for the OS and I have created one cPanel account under that as my own, reseller root account. But now, I have added some storage to my droplet (100GB in /mnt/examplevolume) how do I use this as the place new sites will go? As obviously 25GB is not enough and I can scale this volume up whenever needed.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
But now, I have added some storage to my droplet (100GB in /mnt/examplevolume) how do I use this as the place new sites will go? As obviously 25GB is not enough and I can scale this volume up whenever needed.
Hello @inteldigital,

I recommend mounting the new partition to a location such as /home2. Then, you can force the use of /home2 as the location for new accounts by defining /home2 for the following option in WHM >> Basic WebHost Manager Setup:

Enter the location where you wish for new users’ home directories to be created. By default all directories matching the "Home Directory Prefix" are checked for available disk space and the directory with the most free space will be used.

Additionally, you'll want to adjust the following option (found just below the above option) to a blank value:

Additional home directories matching the following value will also be used for new home directory creations. (Leaving this value blank disables the feature.) This option only takes one value.

This will ensure all new accounts are created on the /home2 partition. For existing accounts, you can move them over to the new partition (this step isn't required, but you can do so if you prefer) using WHM >> Rearrange An Account.

Let us know if you have any questions about this process.

Thanks!
 
  • Like
Reactions: cPanelLauren

inteldigital

Well-Known Member
Apr 5, 2018
88
15
8
England
cPanel Access Level
Root Administrator
Twitter
Hello @inteldigital,

I recommend mounting the new partition to a location such as /home2. Then, you can force the use of /home2 as the location for new accounts by defining /home2 for the following option in WHM >> Basic WebHost Manager Setup:

Enter the location where you wish for new users’ home directories to be created. By default all directories matching the "Home Directory Prefix" are checked for available disk space and the directory with the most free space will be used.

Additionally, you'll want to adjust the following option (found just below the above option) to a blank value:

Additional home directories matching the following value will also be used for new home directory creations. (Leaving this value blank disables the feature.) This option only takes one value.

This will ensure all new accounts are created on the /home2 partition. For existing accounts, you can move them over to the new partition (this step isn't required, but you can do so if you prefer) using WHM >> Rearrange An Account.

Let us know if you have any questions about this process.

Thanks!
@cPanelMichael

Thanks Michael, for your in-depth reply. It's much appreciated. By doing this, will my existing cPanel account be affected in a way that would make new "addon" domains appear in "/home2" ? Or would they still be created in their existing location (which currently is / )

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
By doing this, will my existing cPanel account be affected in a way that would make new "addon" domains appear in "/home2" ? Or would they still be created in their existing location (which currently is / )
Hello @inteldigital,

The existing accounts will continue to use the same partition (even for new addon domains) unless you were to move the account using WHM >> Rearrange An Account.

I've now unmounted /mnt/examplevolume and mounted it to /home2, if I was to change to top option to / and the bottom one to /home2, would this give me the required effect?
No, you'd want to make set the top option to /home2 and set the bottom option to a blank value. This would ensure all new accounts are created on the /home2 partition.

Thank you.
 
  • Like
Reactions: inteldigital