Problem changing addon domain Docroot

jez9999

Well-Known Member
Jun 10, 2005
87
0
156
This is an annoying problem, as I've heard before that it shouldn't cause a problem. When I create an addon domain under my account, it defaults to having the Docroot public_html/subdomainname. However I wish to change that to public_html/sites/subdomainname. A simple change, you might think. However, when I do that and upload the new httpd.conf, the addon domain *disappears* from the list of addon domains!! When I restore the old Docroot path, it reappears.

This is ludicrous. Anyone have an idea why cPanel might be so fussy?

Here's what the VirtualHost directive looks like:

<VirtualHost 72.9.246.101>
ServerAlias www.msol.game-point.net
ServerAdmin [email protected]
DocumentRoot /home/gamept/public_html/sites/msol
BytesLog domlogs/msol.game-point.net-bytes_log
ServerName msol.game-point.net
ServerAlias morton-solicitors.com www.morton-solicitors.com
UseCanonicalName off

User gamept
Group gamept
CustomLog /usr/local/apache/domlogs/msol.game-point.net combined
ScriptAlias /cgi-bin/ /home/gamept/public_html/msol/cgi-bin/
</VirtualHost>
 

jez9999

Well-Known Member
Jun 10, 2005
87
0
156
Well I'll be....

Seems to be working now. And I think the reason is that you need to actually create the directory you change the Docroot to *before* uploading the new httpd.conf, or cPanel will barf. The truly weird thing is that, having accepted this new Docroot, you can actually then delete the directory and cPanel will still show the addon domain.

Straaaange piece of software you guys have here...
 

amal

Well-Known Member
Nov 22, 2003
155
0
166
India
cPanel Access Level
Root Administrator
jez9999 said:
Well I'll be....

Seems to be working now. And I think the reason is that you need to actually create the directory you change the Docroot to *before* uploading the new httpd.conf, or cPanel will barf. The truly weird thing is that, having accepted this new Docroot, you can actually then delete the directory and cPanel will still show the addon domain.

Straaaange piece of software you guys have here...
strange bit of info.. :D
 

xvihost

Active Member
Sep 8, 2005
33
0
156
What is the procedure for this now?

I'm pretty sure direct editing of the httpd.conf will not get you very far as it is re-written by cPanel when a new domain is added. Is this correct?

How do you change the docroot of an Addon Domain???

Peace,
Tom
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
What is the procedure for this now?

I'm pretty sure direct editing of the httpd.conf will not get you very far as it is re-written by cPanel when a new domain is added. Is this correct?

How do you change the docroot of an Addon Domain???

Peace,
Tom
Keep in mind this thread is 3 years old so much of the information presented may be outdated.

To modify the docroot of an Addon Domain, simply remove then re-add the Addon Domain. During the process of adding an Addon Domain, you will be prompted for where you want the docroot to be (anywhere within the user's home directory is acceptable).
 

xvihost

Active Member
Sep 8, 2005
33
0
156
Dave,

That is what I have been doing (removing and re-adding), but what happens when the addon domain has mailboxes and forwarders? Will they not disappear when I do this?

Thanks,
Tom
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Dave,

That is what I have been doing (removing and re-adding), but what happens when the addon domain has mailboxes and forwarders? Will they not disappear when I do this?

Thanks,
Tom
In my testing, regular email addresses will be preserved in this process of removing and re-adding an addon domain, but not email forwarders.