[Mediawiki-l] Exploration: Multiple wikis, shared files, without $wgUseSharedUploads

Agon S. Buchholz asb at kefk.net
Mon Jul 30 23:14:27 UTC 2007


Hi,

I'm currently exploring the file storage of MediaWiki which left me for
several hours in pure amazement, when I realized, that *several wikis*
can share the same files even *without* enabling $wgUseSharedUploads.

Now I'm trying to figure out if this is safe (most probably it isn't,
why else would $wgUseSharedUploads have been invented?). Anyway I'd love
to hear comments from people who have tried similiar stuff!

Starting point:

* Two wikis with apparently different topics (canids, photography),
separate domains, separate codebase, separate image storage. At first I
thought, the topics would be completely different, later I found myself
and others increasingly often replicating images & descriptions between
those two wikis (e.g. images of canids used at the photography wiki to
display characteristics of several lenses, and vice versa). Thus I
started to experiment with shared storage, firstly according to [1]
("Scenario 4: Multiple wikis sharing common resources"), later trying to
avoid a separate image "pool".

Setup:

* Image storage: /var/mw_shared
* MediaWiki sites: /var/www/site1, /var/www/site2
* LocalSettings.php: $wgUploadDirectory  = "/var/mw_shared";

* Apache2 (for site1; site2 similar):
** Alias /wiki "/var/www/site1/w/index.php"
** Alias /index.php "/var/www/site1/w/index.php"
** Alias /w/images "/var/mw_shared"

Preliminary result:

* This extremly simple setup gives me (a) short URLs and (b) and a
shared file storage for both sites. The Alias "/w/images" takes care
that image locations point to a path outside the website's root, and
$wgUploadDirectory from both wikis points to /var/mw_shared, images can
be used in both wikis with the usual syntax [[image:file.ext]].

* At the moment this seems to work, and I haven't yet run into side
effects. However, I'd like to know if this setup is safe and sane since
it appears much too simple to be true.

I'm planning to have both wikis around long term. Even if this setup
would continue to work, would it be preferable fall back to the separate
image "pool" setup according to [1]?

Thanks & Greetings,
-asb


[1] http://www.mediawiki.org/wiki/Manual:Wiki_family





More information about the MediaWiki-l mailing list