wok-next view mirror-tools/stuff/etc/lighttpd/vhosts.conf @ rev 7324

mirror-tools: add /etc/lighttpd/vhosts.conf
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 18 10:21:49 2010 +0100 (2010-11-18)
parents
children d0ddf56fa51f
line source
1 # /etc/lighttpd/vhosts.conf : Virtual hosts configuration file.
2 #
4 # Example.org
5 #
6 #$HTTP["host"] =~ "(^|\.)example\.org$" {
7 #server.document-root = "/var/www/vhost/exemple.com/html"
8 #server.errorlog = "/var/log/lighttpd/example.org-error.log"
9 #accesslog.filename = "/var/log/lighttpd/example.org-access.log"
10 #}
12 # mirror.slitaz.org (Server canonical hostname)
13 #
14 $HTTP["host"] =~ "^mirror\.slitaz\.org$" {
15 server.document-root = "/var/www/slitaz/mirror"
16 server.errorlog = "/var/log/lighttpd/mirror.slitaz.org-error.log"
17 accesslog.filename = "/var/log/lighttpd/mirror.slitaz.org-access.log"
19 include "awstats.conf"
21 alias.url += ( "/info" => "/var/www/mirror-info/" )
23 alias.url += ( "/pizza" => "/var/www/pizza/" )
25 alias.url += ( "/doc" => "/var/www/doc/" )
26 var.dokudir = "/doc"
27 # Rewrites for dokuwiki
28 url.rewrite = (
29 "^" + var.dokudir + "/lib/.*$" => "$0",
30 "^" + var.dokudir + "/_media/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
31 "^" + var.dokudir + "/_media/(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1",
32 "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
33 "^" + var.dokudir + "/_detail/(.*)?$" => var.dokudir + "/lib/exe/detail.php?media=$1",
34 "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
35 "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
36 "^" + var.dokudir + "/doku.php.*" => "$0",
37 "^" + var.dokudir + "/feed.php.*" => "$0",
38 "^" + var.dokudir + "/(.*)\?(.*)" => var.dokudir + "/doku.php?id=$1&$2",
39 "^" + var.dokudir + "/(.*)" => var.dokudir + "/doku.php?id=$1"
40 )
42 alias.url += ( "/webboot" => "/var/www/boot/" )
44 alias.url += ( "/pkgs" => "/var/www/pkgs/" )
45 index-file.names += ( "search.sh" )
46 cgi.assign += (
47 ".sh" => "/bin/sh"
48 )
50 alias.url += ( "/hg" => "/var/www/hg/" )
51 ### url.rewrite-once = ( "/hg(.*)" => "/hg/hgwebdir.py$1" )
52 index-file.names += ( "hgwebdir.py" )
53 cgi.assign += (
54 ".py" => "/usr/bin/python"
55 )
57 alias.url += ( "/www" => "/home/slitaz/website" )
59 # alias.url += ( "/tiny" => "/var/www/pizza/tiny/demos/192.168.0.6/var/www" )
60 # index-file.names += ( "index.sh" )
62 index-file.names += ( "index.html" )
63 index-file.names += ( "index.php" )
64 # Last but not least...
65 index-file.names += ( "/dir-generator.php" )
66 }
68 ## info.mirror.slitaz.org
69 ##
70 #$HTTP["host"] =~ "^info\.mirror\.slitaz\.org$" {
71 # server.document-root = "/var/www/mirror-info/"
72 # server.errorlog = "/var/log/lighttpd/info.mirror.slitaz.org-error.log"
73 # accesslog.filename = "/var/log/lighttpd/info.mirror.slitaz.org-access.log"
74 # include "awstats.conf"
75 #}
77 $HTTP["host"] =~ "ajaxterm\.slitaz\.org$" {
78 proxy.server = ( "/" =>
79 ( ( "host" => "127.0.0.1", "port" => 8022 ) )
80 )
81 }
83 # pizza.slitaz.org (Server canonical hostname)
84 #
85 $HTTP["host"] =~ "^pizza\.slitaz\.org$" {
86 server.document-root = "/var/www/pizza"
87 server.errorlog = "/var/log/lighttpd/pizza.slitaz.org-error.log"
88 accesslog.filename = "/var/log/lighttpd/pizza.slitaz.org-access.log"
89 include "awstats.conf"
90 index-file.names += ( "index.php" )
91 }
93 # slitaz.org
94 #
95 #$HTTP["host"] =~ "(^|www\.)slitaz\.org$" {
96 $HTTP["host"] =~ "www\.slitaz\.org$" {
97 server.document-root = "/home/slitaz/website"
98 server.errorlog = "/var/log/lighttpd/slitaz.org-error.log"
99 accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log"
100 include "awstats.conf"
102 ### index-file.names = ( "index.html" )
103 index-file.names += ( "start.html" )
106 ### url.rewrite-once = (
107 ### "^/about" => "/fr/about",
108 ### "^/artwork" => "/fr/artwork",
109 ### "^/devel" => "/fr/devel",
110 ### "^/doc" => "/fr/doc",
111 ### "^/get" => "/fr/get",
112 ### "^/packages" => "/fr/packages"
113 ### )
115 }
117 # doc.slitaz.org
118 #
119 $HTTP["host"] =~ "doc\.slitaz\.org$" {
120 server.document-root = "/var/www/doc"
121 server.errorlog = "/var/log/lighttpd/doc.slitaz.org-error.log"
122 accesslog.filename = "/var/log/lighttpd/doc.slitaz.org-access.log"
123 index-file.names = ("doku.php")
124 var.dokudir = ""
125 # Rewrites for dokuwiki
126 url.rewrite = (
127 "^" + var.dokudir + "/lib/.*$" => "$0",
128 "^" + var.dokudir + "/_media/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
129 "^" + var.dokudir + "/_media/(.*)$" => var.dokudir + "/lib/exe/fetch.php?media=$1",
130 "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
131 "^" + var.dokudir + "/_detail/(.*)?$" => var.dokudir + "/lib/exe/detail.php?media=$1",
132 "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
133 "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
134 "^" + var.dokudir + "/doku.php.*" => "$0",
135 "^" + var.dokudir + "/feed.php.*" => "$0",
136 "^" + var.dokudir + "/(.*)\?(.*)" => var.dokudir + "/doku.php?id=$1&$2",
137 "^" + var.dokudir + "/(.*)" => var.dokudir + "/doku.php?id=$1"
138 )
139 }
141 # boot.slitaz.org
142 #
143 $HTTP["host"] =~ "boot\.slitaz\.org$" {
144 server.document-root = "/var/www/boot"
145 server.errorlog = "/var/log/lighttpd/boot.slitaz.org-error.log"
146 accesslog.filename = "/var/log/lighttpd/boot.slitaz.org-access.log"
147 }
149 # pkgs.slitaz.org
150 #
151 $HTTP["host"] =~ "pkgs\.slitaz\.org$" {
152 server.document-root = "/var/www/pkgs"
153 server.errorlog = "/var/log/lighttpd/pkgs.slitaz.org-error.log"
154 accesslog.filename = "/var/log/lighttpd/pkgs.slitaz.org-access.log"
155 index-file.names += ( "search.sh" )
156 cgi.assign = (
157 ".sh" => "/bin/sh"
158 )
159 }
161 # hg.slitaz.org (Mercurial repos)
162 #
163 $HTTP["host"] =~ "hg\.slitaz\.org" {
164 cgi.assign = (
165 ".py" => "/usr/bin/python"
166 )
167 server.document-root = "/var/www/hg"
168 # url.rewrite-once = ( "(.*)" => "/hgwebdir.py$1" )
169 index-file.names += ( "hgwebdir.py" )
170 }