DokuWiki will run just fine with Lighttpd and PHP through fastcgi.
Install and configure lighty 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" => "/tmp/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"] =~ "/_ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/bin/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/data/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/inc/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/conf/" { url.access-deny = ( "" ) }
Adjust the var.dokudir variable to match your installation.
Below is just a hack where the leading slash on ”/dokuwiki/” is used to automatically represent the server root dir.
EDIT: For me, the above doesn't work. I had to use exactly this and nothing more:
$HTTP["url"] =~ "/dokuwiki/\.ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "/dokuwiki/_ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + "/dokuwiki/" + "bin/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + "/dokuwiki/" + "data/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + "/dokuwiki/" + "inc/" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + "/dokuwiki/" + "conf/" { url.access-deny = ( "" ) }
See rewriting for how to set up rewrite rules for clean URLs with lighty.
Suggestion: You can merge all directories in one RegEx.
# 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"] =~ "/_ht" { url.access-deny = ( "" ) } $HTTP["url"] =~ "^" + var.dokudir + "/(bin|data|inc|conf)/" { url.access-deny = ( "" ) }