The Air-Conditioning and Internet Are Much Nicer Here

I spent most of the day unlocking the secrets to hosting a centralized multi-site Drupal installation on a shared hosting service. Today I focused on Lunarpages, but the same concepts apply to most such hosts. At these types of places you can often host several domains and/or sub-domains on one account, but you typically don't have Root access and can't create your own VirtualHost declarations. To make up for this they automatically create a home folder for the add-on (sub)domain inside of /www and set the Document Root to that. This is obviously not what you want for a multi-site install. So, what you do is you delete this folder and then create a symlink by the same name that points to /www. If you don't have CLI access, use PHP's symlink() instead of ln.

You'll probably want to keep each site's files directory within the site's directory, which is in the Drupal sites directory (for ease of maintenance), e.g.,

/www/sites
/www/sites/mysite
/www/sites/mysite/files
/www/sites/mysite/modules
/www/sites/mysite/themes

Doing this leads to long paths when referencing such files. I don't know about you, but http://example.com/sites/mysite.com/files/somefile.txt strikes me as a bit long. The URI will be even longer still if you use the Token module to help keep things organized. You see where I am going with this, I am sure—symlink.

Some Other Stuff

  • I set it up so you can create your own user accounts and post comments if you want. Just click the "(Register)" link in the top nav or even that one right there. You'll need to confirm your registration using a link that will be automatically sent to the e-mail address you supply. It may get trapped in your spam filters (these sorts of missives oft do) so keep an eye on your junk mail folder.
  • I'll be working on the photo galleries over the next several days. They will be reorganized and the navigation will be poshed up a bit.
  • I'm also working on an embedded Flash/JavaScript music player module for Zenas at Zenapolae. Arnd Klotz created the player; I will be converting it into a Drupal module. I'll ask if he wants to make it available free to the public. If he does, I'll post the codes somewhere soon.

I have to go home and finish cleaning my room now.