Hi,
I have just signed up for the midphase shared hosting package. I would like to host a selection of websites that may or may not use Drupal.
What I normally like to so is have a separate folder for each of my domains in the root directory, something like this:
/public_html/domain_a
/public_html/domain_b
/public_html/domain_c
Now, midphase support are being a bit lame and are saying that the document root for my 'main domain' cannot be anywhere other than /public_html/. My limited knowledge of apache and my experience with other (much cheaper!) hosts says that they are incorrect on this. Surely in a shared hosting environment it is trivial to set /public_html/where/ever/i/like/ as the document root for any domain?
With 'parked domains' in cpanel it also seems I am locked to /public_html/ as document root.
With 'addon domains' I can put the document root wherever I like, but they also create a subdomain for my 'main domain' which I don't like.
Now, I can think of a couple solutions to this.
[ONE] Use a bogus domain for my 'main domain' and then use 'addon domains' for all the domains I really want to use. This would achieve the file structure I would like, but seems a bit of a silly way to do it.
[TWO] Use 'parked domains' for all my domains (ie. they all point to /public_html/), then use .htaccess to create a virtual document root (i think this is what i mean?) for each domain. Now, I am not really experienced with .htaccess and (a) wonder if this is even possible and (b) wonder if this is going to play with drupal since I know it uses .htaccess to function.
Comments
Option [one] is the only
Option [one] (with a bogus domain to avoid clutter if you want) is the only method that I would trust for anything serious.
Option [two] is possible, using a separate .htaccess file in the root which will do the rewrites (see http://drupal.org/node/144643 and the comments). However I consider it fragile, because it stretches .htaccess to its limits, and you may encounter errors in the future (even unrelated ones) which will be extremely hard to debug, with all the rewrites and the exceptions for virtual paths and real files.
You can't really create a proper virtual web root in .htacces.
i went with with option
i went with with option one.
seems silly to have hosting associated with a domain i don't own, but it works for me...
midphase wanted to charge me to change the domain!
Heh, actually I am using a
Heh, actually I am using a cheap real ".info" domain name which I don't use for any site. I hadn't thought of making it really bogus.
yeah, midphase were happy
yeah, midphase were happy about associating my account with a bogus domain as long as it wasn't one of their "locked domains eg. aol.com"
so, some domains are more important than others? the domain could be registered or unregistered, with high-traffic or not. as long as i don't have access to the whois and dns records then it doesn't really make a difference does it?