Mirror Server

24 Jun 2008 12:55

Today I've (almost) managed to create a mirror server for wikidot.com service.


  • CentOS distribution
  • almost live Wikidot read only mirror
  • database is replicated from the original service in real time to this server
  • user uploaded files are replicated in real time to this server using FS mirror
  • avatars are to be mirrored with rsync every now and then
  • uses Portable IP address:
  • lighttpd serves ALL content with FastCGI PHP
  • database is read-only (as being replication slave)
  • CVS configured to use SSH keys (no password asking)
  • Wikidot PHP source mainly from the current production server
  • Improvements (from CVS): uploaded files served like in OpenSource version


  • FS mirror is not 100% exact, it may not synchronize some (little fraction of) files every now and then, so we must rsync them additionally, to make sure nothing's lost
  • if you were logged in to Wikidot before, it'll complain about not being able to write to ozone_session (because it's read only)
  • Flickr Gallery not working and causing the whole page to display just nothing
  • magic file recognition not working (it may be a problem in PHP configuration or an extension):
PHP Warning:  finfo_open(): Failed to load magic database at '/usr/share/misc/magic'. in /var/www/www.wikidot.com/wikidot/php/utils/- on line 3
PHP Warning:  finfo_file(): supplied argument is not a valid file_info resource in /var/www/www.wikidot.com/wikidot/php/utils/- on line 4
PHP Warning:  finfo_close(): supplied argument is not a valid file_info resource in /var/www/www.wikidot.com/wikidot/php/utils/- on line 5

UPDATE: Flickr problem solution:

  1. yum install php-pear-HTTP-Request
  2. chgrp lighttpd /var/lib/php/session


  • when switching to mirror, we must restart memcached (or force to invalidate every item in it)

Previous post: Lighttpd Serving Wikidot

Next post: Blog Theme

More posts on this topic


Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License