DokuWiki

It's better when it's simple

User Tools

Site Tools


Sidebar

Translations of this page?:

Learn about DokuWiki

Advanced Use

Corporate Use

Our Community


Follow us on Facebook, Twitter and other social networks.

install:lighttpd

Lighttpd

DokuWiki will run just fine with Lighttpd and PHP through FastCGI.

Install and configure lighttpd and PHP by following the Lighttpd And PHP Tutorial. You shouldn't have to mess with the FastCGI settings a lot unless you really want to - here is an example:

fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/bin/php5-fcgi"
                                 )
                               )
                            )

Because lighty does not use .htaccess files you should add a few more config options to deny access to certain files and directories:

Add this to the mod_access module configuration
    # subdir of DokuWiki
    # comprised of the subdir of the root dir where DokuWiki is installed
    # in this case the root dir is the basedir plus /htdocs/
    # Note: be careful with trailing slashes when uniting strings.
    # all content on this example server is served from htdocs/ up.
    var.dokudir = var.basedir + "/htdocs/dokuwiki"
 
    # make sure those are always served through FastCGI and never as static files
    static-file.exclude-extensions = ( ".php" )
 
    # deny access completly to these
    $HTTP["url"] =~ "/(\.|_)ht" { url.access-deny = ( "" ) }
    $HTTP["url"] =~ "^" + var.dokudir + "/(bin|data|inc|conf)/"  { url.access-deny = ( "" ) }

Adjust the var.dokudir variable to match your installation. Check up on how your lighttpd is configured to work out what this should be. The following are examples that you might like to try:

    var.dokudir = var.basedir + "/htdocs/dokuwiki"
    var.dokudir = var.basedir + "/public_html/dokuwiki"
 
    # We assume here that the wiki is accessible via http://wiki.example.com/dokuwiki/
    var.dokudir = "/dokuwiki"
install/lighttpd.txt · Last modified: 2012/04/13 23:51 by 95.112.236.19