Revision [15054]

This is an old revision of LighttpdConfig made by BulletCard on 2006-08-03 15:50:46.

 

Configuring Lighttpd for Wikka


Introduction

I recently got Wikka running under lighttpd, and since I was only able to find limited documentation to support that effort either here or elsewhere, I thought I should document my experience for posterity.

Before I get started, though, I need to acknowledge JavaWoman and LadySerena from WikkaOnIrc #wikka, both for their assistance in getting the URL rewriting working, and for encouraging me to record the results.

Server Configuration

For my particular installation, I wanted to serve Wiki content out of the document root for a dedicated subdomain. So rather than have my Wiki reside at, say, http://www.example.com/wiki, I wanted it at http://wiki.example.com/. I also wanted it to use user-friendly URLs, like http://wiki.example.com/HomePage, rather than the out-of-the-box query-string URLs, such as http://wiki.example.com/wikka.php?wakka=HomePage. Finally, to get the best performance out of the combination of lighttpd and PHP, I chose to interface them using FastCGI.

To that end, I unpacked the Wikka distribution into the directory I had selected for my subdomain's document root, and then set about editing my lighttpd.conf configuration file.

Lighttpd Configuration

With respect to the server.modules configuration parameter, you will need to include mod_fastcgi for FastCGI support and, if you want user-friendly URLs, mod_rewrite. You should also make sure the index.php is included among the values for the server.indexfiles configuration parameter.

To be continued

This is just a placeholder for now. I'll finish this up soon.

$HTTP["host"] =~ "wiki\.example\.com" {
  server.document-root = base + "/web/wiki/"
  fastcgi.server            = ( ".php" =>
									 ( "localhost" =>
									   ( "socket" => base + "/tmp/wikkawiki.socket",
										 "max-procs" => 2,
										 "bin-path" => "/usr/local/www/cgi-bin/php5-fcgi",
										 "bin-environment" =>
										   ( "PHP_FCGI_CHILDREN" => "2",
											 "PHP_FCGI_MAX_REQUESTS" => "5000"
										   )
									   )
									 )
								   )
  url.rewrite-once         = (
									 "^(/images/.*)$" => "$1",
									 "^(/css/.*)$" => "$1",
									 "^(/3rdparty/plugins/freemind/.*)$" => "$1",
									 "^(/3rdparty/plugins/wikiedit/.*)$" => "$1",
									 "^(.*)$" => "wikka.php?wakka=$1"
								   )
}
There is one comment on this page. [Display comment]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki