Creating FTP accounts in subdomains with alternate docroot


Jul 6, 2009
Before I ask the title question about setting up a new subdomain FTP user in a private docroot, I need to explain.

For security and logistical reasons, I need to establish a subdomain that has its own docroot. I've been able to do this using the following steps.
I shelled into my Cpanel account that owns I did a mkdir to create a new directory 'private_html'.
So in /home/mydomain I have these directories (amongst others):
public_html (the domain docroot) and
private_html (soon to be the docroot for a subdomain called 'private'.

In the private_html directory I created an index.html file. It contains the text 'hello world'.

To initially create an entry in the Apache config file for the new subdomain 'private', I logged into Cpanel and created a subdomain called 'private'. Of course, this process created a new directory /home/mydomain/public_html/private. I deleted this directory because I dont want it there. To tell Apache about my new docroot for 'private', I logged into root shell and edited the apache config file httpd.conf. I found the VirtualHost tag for the ServerName which was
I changed the DocumentRoot for this entry from
/home/mydomain/public_html/private -to-

I saved and restarted Apache
Now I can browse to The browser correctly reports 'hello world'.

But now Cpanel can not create an FTP account using the new directory.
IE: Using Cpanel I want to create a new FTP account that can access

When I use Cpanel to try to do this, on the 'Add FTP account' page, Cpanel hard codes the directory field with '/home/mydomain/public_html'. This does not allow me to set an ftproot for the new account to my new private_html directory.

Thanx for you help.