DokuWiki

From ArchWiki
Revision as of 13:33, 18 June 2008 by Timetrap (talk | contribs) (Uploaded Initial Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

install lighttpd and fastCGI

 pacman -S lighttpd fcgi

add an entry to your rc.conf

 DAEMONS={lighttpd}

Edit your /etc/hosts.allow

 lighttpd:    ALL

Start your webserver (sanity check)

 /etc/rc.d/lighttpd start

Open a web browser to your servers ip address; You should see this:

   
     Arch Linux
   
   

This is a test page for the lighttpd Web Server.

Stop the webserver

 /etc/rc.d/lighttpd stop

Configure lighttp Uncomment these lines

 "mod_fastcgi"

fastcgi.server = ( ".php" =>

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

Configure fcgi

Go to doku wiki and get the latest version

 cd /home/lighttp
 wget etc
 tar xvf
 mv dokuwiki-DATE dokuwiki

chown the dokuwiki files

 chown -R nobody:nobody dokuwiki/

(nobody is the default user for lighttp, if you changed this, change the user:group to the lighttp user:group)

/etc/lighthttpd/lighttpd.conf Under the line: $HTTP["url"] =~ "\.pdf$" {

 server.range-requests = "disable"

}

add this:

  1. subdir of dokuwiki
  2. comprised of the subdir of the root dir where dokuwiki is installed
  3. in this case the root dir is the basedir plus /htdocs/
  4. Note: be careful with trailing slashes when uniting strings.
  5. all content on this example server is served from htdocs/ up.
  6. var.dokudir = var.basedir + "/dokuwiki"

var.dokudir = server.document-root + "/dokuwiki"

  1. make sure those are always served through fastcgi and never as static files
  2. 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 = ( "" ) }

Start your webserver

 /etc/rc.d/lighttpd start

Open a webbrowser to

 http://'address'/dokuwiki/install.php

After configuring the server remove the install.php file