I host 40+ sites on a single server, each site being it's own Joomla installation (managed by a central distribution system, of course). Every site is in it's own directory,
/var/www/<site>. Some sites have their own domains, which are configured by defining VirtualHosts.
Most sites don't have their own domains, but rather use a subdirectory under my main domain as their url,
I also have one main site that handles every request to
/, this is located at
/var/www/main. So currently when user requests
http://mysite.fi they're redirected to
I would like for this to be transparent. When user requests a valid
http://mysite.fi/<site> they should of course see that site. But if they request
http://mysite.fi/mainsitearticle that request should then go to the site at
/var/www/main, and it should remain transparent so that the user's URL doesn't change.
One way that this result is possible to implement with correct results is by symlinking everything under
/var/www/main directly to
/var/www, so the sever actually thinks there's a Joomla living at
/var/www. But this isn't a very elegant solution.
To recap what I want:
Directories: /var/www /var/www/kiwi /var/www/apple /var/www/berry /var/www/main /var/www/main/images Requests: http://mysite.fi/kiwi/ -> /var/www/kiwi/ http://mysite.fi/apple/ -> /var/www/apple/ http://mysite.fi/apple/somearticle -> /var/www/apple/ (*) http://berry.fi/ -> /var/www/berry/ http://mysite.fi/ -> /var/www/base/ http://mysite.fi/some_article_name -> /var/www/base/ (*) http://mysite.fi/images/thelogo.png -> /var/www/base/images/thelogo.png (* = final request handled by Joomla's .htaccess mod_rewrite rules)
So what would be the elegant way to configure this behaviour?