cPanel vs. Linux
To help you understand where everything is, I want to go over a few things.
- cPanel is a control panel on top of Linux. But it's still Linux; there's nothing overly special about cPanel regarding users.
- Most webservers use Apache on CentOS, and all user information is stored in the /home/
- Inside /home/
is the files for your domains. Not webpages -- not yet -- but the logs, temp space used by the system, etc.
- The /home/username/public_html/
folder is the default location for sites. Not that I said "default", as it's not a requirement.
Alright, now that that is explained...
Addon domains -- don't use the default settings!
When you go to add a domain in cPanel -- an "addon" domain -- it shares the same home folder with the first domain.
This is different from adding a new account in WHM (the admin part of cPanel), which creates unique home folders for all accounts. Depending on the content of the site, and the resources of the site (which is affected by traffic, the plugins of popular CMS like WordPress, etc), an "addon domain" may or may not be a good idea. If so, great! If not, you'll likely need a reseller account or greater.
(Note: This post is being written for a client. And having an addon is fine for his needs.)
If the default in cPanel is used, it puts all domains as both a subfolder and subdomain of the primary domain. However, the default setting can be a problem -- for security, for SEO, even just for organization.
This concept was explained more in-depth here: http://www.digitalfaq.com/forum/web-...html#post19021
So instead of:
We want this:
And when accessing it via FTP or the cPanel file manager, that's where the files are for primary.com
. Everything is NOT stored in the public_html!
Furthermore, we should delete the unwanted subdomain entries from cPanel's DNS zone editor.
We've done all of this for our client already.
When it comes to domain-to-folder structures, cPanel is more complicated than other control panels. If you're doing it the correct way, that is! And while that may make it seem as if cPanel is not a good panel, it's not the case, While cPanel has some oddities in the way data is organized, it's still the most secure, feature-rich and updated panel out there. Everthing else is junk by comparison. This is just a "feature" that we have to (for now) learn to live with.