View Full Version : Subdomain web root
Jeanna
2003-08-29, 12:38 PM
I am fairly new to this, so pardon me if this is a stupid question:
I would like the document root folder for subdomains to be outsite the web root of the main site like so:
/username/public_html main site
/username/subdomain subdomain
By default in cpanel, they are set up within the public_html folder. How can I change this?
I'm not too familiar with this so I may be pointing you in the wrong direction:
http://www.cpanel.net/docs/cp/index.html
How do I use cPanel -> Subdomains
At the bottom of that page, there is also an "Adding subdomains redirection" link.
If this isn't want you're trying to do, just post again and I'll dig around a little further. :)
Jeanna
2003-08-29, 17:10 PM
Thanks, but I don't think that does what I want, because I don't really want to redirect to a different url
I want the url to remain the same, so it would be accessed via
http://subdomain.maindomain.com
I just want the folder on the server to reside in the user directory, not public_html. I believe I have to edit httpd.conf somehow, but couldn't make it work after bumbling around.
Jeanna
As far as I can tell, there really isn't any way to do exactly that from within the CPanel interface. You could create another domain with a whole new user, so you would end up with a directory structure like this:
/home/user1/public_html
/home/user2/public_html
Where user1 would be the user for "maindomain.com" and user2 would be the user for "subdomain.maindomain.com". For all practical purposes, there is no difference between a domain and subdomain.
The only other way to do this would be to manually edit the httpd.conf, which would probably be a bad idea since CPanel would overwrite your changes every time someone added, removed, or modified one of their domains. Ah, the joy of control panels :)
You either do it their way, or you don't do it.
:rolleyes:
Jeanna
2003-08-29, 18:16 PM
sigh....
Thanks QT!
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.