Lighttpd Serving Wikidot

12 Jun 2008 06:46

I work on the configuration of the Lighttpd webserver and Wikidot tweaks to eventually run Wikidot on Lighttpd.

The configuration of Lighttpd:

  • .htaccess rewritten to lighttpd.conf
  • all rules are rewrite-once (like RewriteRule [L] in Apache)
    • mixing rewrite-repeat with rewrite-once is tricky
  • standard lighttpd fastcgi php configuration
  • serving uploaded files through php program (no more flags/private)
  • non-existing avatars handled by 404 error handler on avatar directories

The tweaks in Wikidot:

  • sanitized PrivateFileFlowController
  • created new: UploadedFileFlowController
  • they can eventually become one file (PrivateFileFlowController shouldn't be needed anymore)
  • created new: local.php (to substitute private_file_filter.php)
  • SSL seem to work correctly

Still to do:

  • replace (configure the backend) readfile() with Header("X-Sendfile…")
  • UploadedFileFlowController should deal with:
    • redirections
    • html files
    • secure * domain
    • SSL
    • magic database better

UPDATE: 2008-06-13: done some things, still to do:

  • replace (configure the backend) readfile() with Header("X-Sendfile…")
  • SSL is not ready, because $_SERVER["HTTPS"] is not supported in fast-cgi


if HOST = *
    URL = http[s]://[site][file]
    send = 1
    URL = http[s]://[domain]/files--upload/[file]
    if file is text/html or xml+html:
        301 to http[s]://[site][file]
if send:
    check permissions
    set mime type
    send file

Next post: Mirror Server

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