PDA

View Full Version : Add-on domains root directories



Copperblade
03-23-2008, 05:24 AM
How come my add-on domains require their root directories to be put under ~/public_html/ but my subdomains can be put anywhere under ~/ ? This is a little annoying since I like to use rsync --delete to move files around, and this is going to make me put all of my domains under one directory.

Is there any way to make add-on domains with more freedom?

sdasevne
03-23-2008, 07:20 AM
Shadmego explained the public_html directory very well in this thread, which seems to indicate that ALL files must be in public_html:


1. The www folder is nothing more than a soft link to the public_html folder. In other words, they point to the same exact place. Actually, the real directory is public_html. The www is a link to the public_html folder.

2. An addon domain is nothing more than a subdomain with it's own name .... if that didn't confuse you. Think of it this way:

your main domain loads its pages from public_html. Suppose you have an addon domain called, imaginatively enough, addon.com that you loaded as an addon to your main domain, maindomain.com. The system creates a folder in the public_html directory with the name of the addon domain (addon, or addon.com). This new directory becomes the public_html folder for the addon domain, so the new domain will load its pages from public_html/addon (or public_html/addon.com).

Another way of thinking of this is:

If someone points their browser to www.maindomain.com, they will load pages inside public_html. If they point their browser instead to www.addon.com, they will get the pages inside public_html/addon.

Copperblade
03-23-2008, 03:02 PM
Ok, so I gather from that the case is that hostmonster simply only puts a <Directory> directive in the Apache conf to open up the public_html directory. I guess that's a more secure way to do it.

Yeah, come to think of it, I think I made my users do the same thing. Just not used to putting all my sites under one home directory after running my own server for so long.