changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > werc / sites/werc.cat-v.org/docs/web-server-setup/lighttpd.md

changeset 635: dd58ad29ffbf
parent: sites/werc.cat-v.org/docs/web_server_setup/lighttpd.md@be69f93e942c
author: Uriel <u@berlinblue.org>
date: Sun, 30 May 2010 18:04:04 +0000
permissions: -rw-r--r--
description: Replace '_' in paths in werc's docs section with '-', and set up apropriate redirects to avoid broken links.
1 Setup werc with lighttpd
2 ========================
3 
4 You will need to enable to the following modules: `mod_cgi`, `mod_alias` and `mod_rewrite` (for non-minimal configurations).
5 
6 You can also find `mod_setenv` useful to change werc's environment ($PATH in perticular)
7 
8 Minimal setup
9 -------------
10 This is the most minimal setup, for a single domain, and lets werc handle static files.
11 
12  $HTTP["host"] =~ "^test\.cat-v\.org$" {
13  index-file.names = ( )
14  server.error-handler-404 = "/werc.rc"
15  alias.url += ( "/werc.rc" => "/var/www/cat-v.org/bin/werc.rc" ) # Here use the path to werc.rc in your system.
16  cgi.assign += ( ".rc" => "")
17  server.dir-listing = "disable"
18  }
19 
20 Advanced setup
21 --------------
22 
23 A more ellaborate setup, using virtual hosts to handle multiple domains, and
24 alias to let lighttpd handle static files. Also show how to add external cgi's
25 to the setup, in this case Mercurial's web interface.
26 
27  $HTTP["host"] =~ "^((harmful|9p|gsoc|doc|uriel|src|repo|www|)(\.|)cat-v\.org|(www\.)?binarydream.org|)$" {
28 
29  index-file.names = ( )
30  evhost.path-pattern = "/var/www/cat-v.org/sites/%3.%0/"
31  server.error-handler-404 = "/werc.rc"
32 
33  alias.url += ( "/pub/" => "/var/www/cat-v.org/pub/" )
34  alias.url += ( "/favicon.ico" => "/var/www/cat-v.org/pub/default_favicon.ico" )
35  alias.url += ( "/doc/" => "/var/www/cat-v.org/sites/doc.cat-v.org/" )
36  alias.url += ( "/werc.rc" => "/var/www/cat-v.org/bin/werc.rc" )
37  alias.url += ( "/debug.rc" => "/var/www/cat-v.org/bin/debug.rc" )
38  cgi.assign += ( ".rc" => "")
39  server.dir-listing = "disable"
40 
41  cgi.assign += ( ".cgi" => "")
42  url.rewrite-once = ( "/hg/(.*)" => "/hg/hgwebdir.cgi/$1" )
43  alias.url += ( "/hg/" => "/var/www/cat-v.org/bin/" )
44  }