slitaz-forge rev 135

Add mirror.slitaz.org vhost.conf Makefile and README
author Christophe Lincoln <pankso@slitaz.org>
date Thu Mar 15 05:42:05 2012 +0100 (2012-03-15)
parents e75b3338531f
children f15eebb6ecfd
files mirror/Makefile mirror/README mirror/files/etc/lighttpd/vhosts.conf
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mirror/Makefile	Thu Mar 15 05:42:05 2012 +0100
     1.3 @@ -0,0 +1,13 @@
     1.4 +# Makefile for SliTaz mirror.
     1.5 +# Check the README for more information.
     1.6 +#
     1.7 +
     1.8 +PREFIX?=/usr
     1.9 +
    1.10 +all:
    1.11 +
    1.12 +install:
    1.13 +	install -m 0644 files/etc/lighttpd/vhosts.conf /etc/lighttpd
    1.14 +
    1.15 +uninstall:
    1.16 +	rm -f /etc/lighttpd/vhosts.conf
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mirror/README	Thu Mar 15 05:42:05 2012 +0100
     2.3 @@ -0,0 +1,2 @@
     2.4 +
     2.5 +Files used on mirror.slitaz.org
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/mirror/files/etc/lighttpd/vhosts.conf	Thu Mar 15 05:42:05 2012 +0100
     3.3 @@ -0,0 +1,230 @@
     3.4 +# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file.
     3.5 +#
     3.6 +
     3.7 +# mirror.slitaz.org (Server canonical hostname)
     3.8 +#
     3.9 +$HTTP["host"] =~ "^mirror([0-9]*)\.slitaz\.(org|com|eu|net)$" {
    3.10 +  server.document-root = "/var/www/slitaz/mirror"
    3.11 +  server.errorlog = "/var/log/lighttpd/mirror.slitaz.org-error.log"
    3.12 +  accesslog.filename = "/var/log/lighttpd/mirror.slitaz.org-access.log"
    3.13 +  
    3.14 +  include "awstats.conf"
    3.15 +  
    3.16 +  alias.url += ( "/info" => "/var/www/mirror-info/" )
    3.17 +  alias.url += ( "/console" => "/var/www/console/" )
    3.18 +  alias.url += ( "/ssh" => "/var/www/ssh/" )
    3.19 +  alias.url += ( "/demo" => "/var/www/demo/" )
    3.20 +  alias.url += ( "/usbkey" => "/var/www/usbkey/" )
    3.21 +  
    3.22 +  alias.url += ( "/pizza" => "/var/www/pizza/" )
    3.23 +  
    3.24 +  alias.url += ( "/doc" => "/var/www/doc/" )
    3.25 +  var.dokudir = "/doc"
    3.26 +  # Rewrites for dokuwiki
    3.27 +  url.rewrite = (
    3.28 +    "^" + var.dokudir + "/lib/.*$"              => "$0",
    3.29 +     "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
    3.30 +     "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
    3.31 +     "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
    3.32 +     "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
    3.33 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
    3.34 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
    3.35 +     "^" + var.dokudir + "/doku.php.*"           => "$0",
    3.36 +     "^" + var.dokudir + "/feed.php.*"           => "$0",
    3.37 +     "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
    3.38 +     "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
    3.39 +  )
    3.40 +
    3.41 +  alias.url += ( "/webboot" => "/var/www/boot/" )
    3.42 +
    3.43 +  alias.url += ( "/pkgs" => "/var/www/pkgs/" )
    3.44 +  index-file.names += ( "search.sh", "search.cgi" )
    3.45 +  cgi.assign += (
    3.46 +    ".sh" => "/bin/sh",
    3.47 +    ".cgi" => "/bin/sh"
    3.48 +  )
    3.49 +
    3.50 +  alias.url += ( "/hg" => "/var/www/hg/" )
    3.51 +###  url.rewrite-once = ( "/hg(.*)" => "/hg/hgwebdir.py$1" )
    3.52 +  index-file.names += ( "hgwebdir.py" )
    3.53 +  cgi.assign += (
    3.54 +    ".py" => "/usr/bin/python"
    3.55 +  )
    3.56 +
    3.57 +  alias.url += ( "/www" => "/home/slitaz/website" )
    3.58 +  
    3.59 +#  alias.url += ( "/tiny" => "/var/www/pizza/tiny/demos/192.168.0.6/var/www" )
    3.60 +#  index-file.names += ( "index.sh" )
    3.61 +  
    3.62 +  index-file.names += ( "index.html" )
    3.63 +  index-file.names += ( "index.php" )
    3.64 +  # Last but not least...
    3.65 +  index-file.names += ( "/dir-generator.php" )
    3.66 +}
    3.67 +
    3.68 +$HTTP["host"] =~ "ajaxterm\.slitaz\.(org|com|eu)$" {
    3.69 +  proxy.server = ( "/" => 
    3.70 +  	( ( "host" => "127.0.0.1", "port" => 8022 ) )
    3.71 +  )
    3.72 +}
    3.73 +
    3.74 +# ssh.slitaz.org
    3.75 +#
    3.76 +$HTTP["host"] =~ "^ssh\.slitaz\.(org|com|eu)$" {
    3.77 +  server.document-root = "/var/www/ssh"
    3.78 +  server.errorlog = "/var/log/lighttpd/ssh.slitaz.org-error.log"
    3.79 +  accesslog.filename = "/var/log/lighttpd/ssh.slitaz.org-access.log"
    3.80 +  include "awstats.conf"
    3.81 +  index-file.names += ( "index.html" )
    3.82 +}
    3.83 +
    3.84 +# pizza.slitaz.org
    3.85 +#
    3.86 +$HTTP["host"] =~ "^pizza\.slitaz\.(org|com|eu)$" {
    3.87 +  server.document-root = "/var/www/pizza"
    3.88 +  server.errorlog = "/var/log/lighttpd/pizza.slitaz.org-error.log"
    3.89 +  accesslog.filename = "/var/log/lighttpd/pizza.slitaz.org-access.log"
    3.90 +  include "awstats.conf"
    3.91 +  index-file.names += ( "index.php" )
    3.92 +}
    3.93 +
    3.94 +# tiny.slitaz.org
    3.95 +#
    3.96 +$HTTP["host"] =~ "^tiny\.slitaz\.(org|com|eu)$" {
    3.97 +  server.document-root = "/var/www/pizza/tiny"
    3.98 +  server.errorlog = "/var/log/lighttpd/tiny.slitaz.org-error.log"
    3.99 +  accesslog.filename = "/var/log/lighttpd/tiny.slitaz.org-access.log"
   3.100 +  include "awstats.conf"
   3.101 +  index-file.names += ( "index.php" )
   3.102 +}
   3.103 +
   3.104 +# slitaz.org
   3.105 +#
   3.106 +#$HTTP["host"] =~ "(^|www\.)slitaz\.(org|com|eu)$" {
   3.107 +$HTTP["host"] =~ "^www\.slitaz\.(org|com|eu)$" {
   3.108 +  server.document-root = "/home/slitaz/website"
   3.109 +  server.errorlog = "/var/log/lighttpd/slitaz.org-error.log"
   3.110 +  accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log"
   3.111 +  include "awstats.conf"
   3.112 +  
   3.113 +###  index-file.names = ( "index.html" )
   3.114 +###  index-file.names += ( "start.html" )
   3.115 +  index-file.names += ( "index.php" )
   3.116 +  
   3.117 +  
   3.118 +###  url.rewrite-once = (
   3.119 +###    "^/about" => "/fr/about",
   3.120 +###	"^/artwork" => "/fr/artwork",
   3.121 +###	"^/devel" => "/fr/devel",
   3.122 +###    "^/doc" => "/fr/doc",
   3.123 +###	"^/get" => "/fr/get",
   3.124 +###	"^/packages" => "/fr/packages"
   3.125 +###  )
   3.126 + 
   3.127 +}
   3.128 +
   3.129 +# doc.slitaz.org
   3.130 +#
   3.131 +$HTTP["host"] =~ "doc\.slitaz\.(org|com|eu)$" {
   3.132 +  server.document-root = "/var/www/doc"
   3.133 +  server.errorlog = "/var/log/lighttpd/doc.slitaz.org-error.log"
   3.134 +  accesslog.filename = "/var/log/lighttpd/doc.slitaz.org-access.log"
   3.135 +  index-file.names = ("doku.php")
   3.136 +  var.dokudir = ""
   3.137 +  # Rewrites for dokuwiki
   3.138 +  url.rewrite = (
   3.139 +    "^" + var.dokudir + "/lib/.*$"              => "$0",
   3.140 +     "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
   3.141 +     "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
   3.142 +     "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
   3.143 +     "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
   3.144 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
   3.145 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
   3.146 +     "^" + var.dokudir + "/doku.php.*"           => "$0",
   3.147 +     "^" + var.dokudir + "/feed.php.*"           => "$0",
   3.148 +     "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
   3.149 +     "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
   3.150 +  )
   3.151 +}
   3.152 +
   3.153 +# boot.slitaz.org
   3.154 +#
   3.155 +$HTTP["host"] =~ "boot\.slitaz\.(org|com|eu)$" {
   3.156 +  server.document-root = "/var/www/boot"
   3.157 +  server.errorlog = "/var/log/lighttpd/boot.slitaz.org-error.log"
   3.158 +  accesslog.filename = "/var/log/lighttpd/boot.slitaz.org-access.log"
   3.159 +}
   3.160 +
   3.161 +# pkgs.slitaz.org
   3.162 +#
   3.163 +$HTTP["host"] =~ "pkgs\.slitaz\.(org|com|eu)$" {
   3.164 +  server.document-root = "/var/www/pkgs"
   3.165 +  server.errorlog = "/var/log/lighttpd/pkgs.slitaz.org-error.log"
   3.166 +  accesslog.filename = "/var/log/lighttpd/pkgs.slitaz.org-access.log"
   3.167 +  index-file.names += ( "search.sh" )
   3.168 +  cgi.assign = (
   3.169 +    ".sh" => "/bin/sh"
   3.170 +  )
   3.171 +}
   3.172 +
   3.173 +# hg.slitaz.org (Mercurial repos)
   3.174 +#
   3.175 +$HTTP["host"] =~ "hg\.slitaz\.(org|com|eu)" {
   3.176 +  cgi.assign = (
   3.177 +    ".py" => "/usr/bin/python"
   3.178 +  )
   3.179 +  server.document-root = "/var/www/hg"
   3.180 +#  url.rewrite-once = ( "(.*)" => "/hgwebdir.py$1" )
   3.181 +  index-file.names += ( "hgwebdir.py" )
   3.182 +}
   3.183 +
   3.184 +# demo.slitaz.org (Server canonical hostname)
   3.185 +#
   3.186 +$HTTP["host"] =~ "^demo\.slitaz\.(org|com|eu)$" {
   3.187 +  server.document-root = "/var/www/demo"
   3.188 +  server.errorlog = "/var/log/lighttpd/demo.slitaz.org-error.log"
   3.189 +  accesslog.filename = "/var/log/lighttpd/demo.slitaz.org-access.log"
   3.190 +  include "awstats.conf"
   3.191 +  index-file.names += ( "index.html" )
   3.192 +#100% CPU?  cgi.assign += ( ".sh" => "/bin/sh" )
   3.193 +  index-file.names += ( "index.sh" )
   3.194 +}
   3.195 +
   3.196 +# floppy.slitaz.org
   3.197 +#
   3.198 +$HTTP["host"] =~ "^floppy\.slitaz\.(org|com|eu)$" {
   3.199 +  server.document-root = "/var/www/slitaz/mirror/floppies"
   3.200 +  server.errorlog = "/var/log/lighttpd/floppy.slitaz.org-error.log"
   3.201 +  accesslog.filename = "/var/log/lighttpd/floppy.slitaz.org-access.log"
   3.202 +  include "awstats.conf"
   3.203 +  index-file.names += ( "index.html" )
   3.204 +}
   3.205 +
   3.206 +# usbkey.slitaz.org
   3.207 +#
   3.208 +$HTTP["host"] =~ "^usbkey\.slitaz\.(org|com|eu)$" {
   3.209 +  server.document-root = "/var/www/usbkey"
   3.210 +  server.errorlog = "/var/log/lighttpd/usbkey.slitaz.org-error.log"
   3.211 +  accesslog.filename = "/var/log/lighttpd/usbkey.slitaz.org-access.log"
   3.212 +  include "awstats.conf"
   3.213 +  index-file.names += ( "index.php" )
   3.214 +}
   3.215 +
   3.216 +# dvd.slitaz.org
   3.217 +#
   3.218 +$HTTP["host"] =~ "^dvd\.slitaz\.(org|com|eu)$" {
   3.219 +  server.document-root = "/var/www/dvd"
   3.220 +  server.errorlog = "/var/log/lighttpd/dvd.slitaz.org-error.log"
   3.221 +  accesslog.filename = "/var/log/lighttpd/dvd.slitaz.org-access.log"
   3.222 +  include "awstats.conf"
   3.223 +  index-file.names += ( "index.php" )
   3.224 +}
   3.225 +
   3.226 +# iso.slitaz.org
   3.227 +#
   3.228 +$HTTP["host"] =~ "^iso\.slitaz\.(org|com|eu)$" {
   3.229 +  server.document-root = "/var/www/iso"
   3.230 +  server.errorlog = "/var/log/lighttpd/iso.slitaz.org-error.log"
   3.231 +  accesslog.filename = "/var/log/lighttpd/iso.slitaz.org-access.log"
   3.232 +  include "awstats.conf"
   3.233 +}