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
 * gzip -dc lighttpd-1.3.14.tar.gz | tar xf -
 * cd lighttpd-1.3.14
 * ./configure --prefix=/opt/lighttpd
 * make all install
 * cp doc/lighttpd.conf /etc/
 * cd ..
 * gzip -dc php-5.0.4.tar.gz | tar xf -
 * cd php-5.0.4
 * ./configure --enable-fastcgi --with-mysql=<path to MySQL installation> --prefix=/opt/php-fcgi</tt>
 * make all install</tt>
 * Edit /etc/lighttpd.conf as appropriate. You will need to add at least the following lines:

url.rewrite-once = (                    "^/$" => "/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  "http://yoursite/ArticleName" </tt> 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 mv mediawiki-1.5beta1 w</tt>
 * Start lighttpd: /opt/lighttpd/sbin/lighttpd -f /etc/lighttpd.conf</tt>
 * Visit  "http://www.yoursite.com/w/config/index.php" </tt> and configure MediaWiki as documented at Manual:Installation guide
 * Edit LocalSettings.php and change $wgArticlePath to:
 * Done!