DokuWiki

It's better when it's simple

User Tools

Site Tools


install:lighttpd

This is an old revision of the document!


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.1423238875.txt.gz · Last modified: 2015-02-06 17:07 by gurke

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki