Over the past months, I've gained some experience in setting up Drupal websites. I have some knowledge of php and mysql, but I generally don't go around tweaking modules too much.

I now have a few installations running, and I've started to look into multi-site installations to save space and especially ease the configuration and administration load on yours truly.

I'm working with several hosts, all of whom offer myphpadmin and ftp access. So far, this has allowed me to do everything I needed.

This is what I've tried to do:

Ofcourse I researched this problem, and somewhere I read something about 'symlinks' or something like it. I got as far as understanding that it has to do with shell access and making a directory redirect to another directory (after which it could be deleted, if I recall the description correctly). This redirect would be quite different from the html redirects which I've used. So, this I get. But the problem is, I don't have shell access!

So my question is the following: can you set up a multi-site installation similar to what I described above, without shell access to the server?

I think I could probably get this to work if I registered different domain names for each multi site, but that doesn't fit the requirements of my project (and it costs extra money as well).

Comments

jon@jony.net’s picture

There is a usefull php script that may allow you to have semi-shell access. You can't run any interactive programs, but you can make symlinks and delete folders just fine. It's called PhpShell and you can find it at http://freshmeat.net/projects/phpshell/

Now, be warned that some times having symlinks isnt such a good thing, for instance, if you have example.com and that points to /public_html/ and you have test.example.com pointing to /public_html/test, then example.com/test will redirect you to the home page of example.com. I don't know if thats a problem for you, but its a big problem for me.

Now, your other option, is to get ahold of your hosting provider, and ask them very nicly to point all your vhosts to the same place, ie public_html/. Then you don't get the redirection problem mentioned above.

-J

Diederick Janse’s picture

Thanks a lot for your swift reply. I'll be looking into this!

stefanoq’s picture

I managed to get this to work without shell access.

I used this approach.

drupal installation: www/mydomain.com/mydrupal

I use the baseURL: site1.mydomain.com/mydrupal for site one
and site2.mydomain.com/mydrupal for site two.

I created two directories within mydrupal/sites:
site1.mydrupal.com and
site2.mydrupal.com.

In each of these directories there is a different version of the settings.php file that points to different databases.

Everything else is shared!