Manual:Installing MediaWiki with Lighttpd

This page presents step-by-step instructions for installing MediaWiki with Lighttpd and PHP+FastCGI. We will assume you have MySQL installed already.

fastcgi.server = ( ".php" =>                  ( "localhost" => (                      "host" => "127.0.0.1",                       "port" => 1026,                       "bin-path" => "/opt/php-fcgi/bin/php-cgi"                     ) )               )
 * Download Lighttpd
 * Download PHP
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:

url.rewrite-once = (                    "^/wiki/upload/(.+)" => "/wiki/upload/$1",                     "^/$" => "/w/index.php",                     "^/wiki/([^?]*)(?:\?(.*))?" => "/w/index.php?title=$1&$2"                   )

If you use the static-file module, it will try to cache everything it can... including the PHP modules that are supposed to be executed instead. So in many cases you'll also need to add: static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) or at least: static-file.exclude-extensions = ( ".php" )

And if you also want to support  URLs: url.redirect = ( "^/(?!w|wiki|robots\.txt|favicon\.ico)(.*)" => "/wiki/$1" ) Ensure the "rewrite", "redirect" and "fastcgi" modules are enabled. $wgArticlePath = "/wiki/$1";
 * Extract the MediaWiki source into your document root, and
 * Start lighttpd:
 * Visit  and configure MediaWiki as documented at Manual:Installation guide
 * Edit LocalSettings.php and change $wgArticlePath to:
 * Done
 * Not Done! Test