slitaz-dev-tools diff mirror-tools/etc/lighttpd/vhosts.conf @ rev 4

Starting to add mirror-tools. Add etc. home. and usr so far.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Feb 24 01:03:48 2011 +0000 (2011-02-24)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mirror-tools/etc/lighttpd/vhosts.conf	Thu Feb 24 01:03:48 2011 +0000
     1.3 @@ -0,0 +1,184 @@
     1.4 +# /etc/lighttpd/vhosts.conf : Virtual hosts configuration file.
     1.5 +#
     1.6 +
     1.7 +# Example.org
     1.8 +#
     1.9 +#$HTTP["host"] =~ "(^|\.)example\.org$" {
    1.10 +  #server.document-root = "/var/www/vhost/exemple.com/html"
    1.11 +  #server.errorlog = "/var/log/lighttpd/example.org-error.log"
    1.12 +  #accesslog.filename = "/var/log/lighttpd/example.org-access.log"
    1.13 +#}
    1.14 +
    1.15 +# mirror.slitaz.org (Server canonical hostname)
    1.16 +#
    1.17 +$HTTP["host"] =~ "^mirror([0-9]*)\.slitaz\.org$" {
    1.18 +  server.document-root = "/var/www/slitaz/mirror"
    1.19 +  server.errorlog = "/var/log/lighttpd/mirror.slitaz.org-error.log"
    1.20 +  accesslog.filename = "/var/log/lighttpd/mirror.slitaz.org-access.log"
    1.21 +  
    1.22 +  include "awstats.conf"
    1.23 +  
    1.24 +  alias.url += ( "/info" => "/var/www/mirror-info/" )
    1.25 +  
    1.26 +  alias.url += ( "/pizza" => "/var/www/pizza/" )
    1.27 +  
    1.28 +  alias.url += ( "/doc" => "/var/www/doc/" )
    1.29 +  var.dokudir = "/doc"
    1.30 +  # Rewrites for dokuwiki
    1.31 +  url.rewrite = (
    1.32 +    "^" + var.dokudir + "/lib/.*$"              => "$0",
    1.33 +     "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
    1.34 +     "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
    1.35 +     "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
    1.36 +     "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
    1.37 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
    1.38 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
    1.39 +     "^" + var.dokudir + "/doku.php.*"           => "$0",
    1.40 +     "^" + var.dokudir + "/feed.php.*"           => "$0",
    1.41 +     "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
    1.42 +     "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
    1.43 +  )
    1.44 +
    1.45 +  alias.url += ( "/webboot" => "/var/www/boot/" )
    1.46 +
    1.47 +  alias.url += ( "/pkgs" => "/var/www/pkgs/" )
    1.48 +  index-file.names += ( "search.sh" )
    1.49 +  cgi.assign += (
    1.50 +    ".sh" => "/bin/sh"
    1.51 +  )
    1.52 +
    1.53 +  alias.url += ( "/hg" => "/var/www/hg/" )
    1.54 +###  url.rewrite-once = ( "/hg(.*)" => "/hg/hgwebdir.py$1" )
    1.55 +  index-file.names += ( "hgwebdir.py" )
    1.56 +  cgi.assign += (
    1.57 +    ".py" => "/usr/bin/python"
    1.58 +  )
    1.59 +
    1.60 +  alias.url += ( "/www" => "/home/slitaz/website" )
    1.61 +  
    1.62 +#  alias.url += ( "/tiny" => "/var/www/pizza/tiny/demos/192.168.0.6/var/www" )
    1.63 +#  index-file.names += ( "index.sh" )
    1.64 +  
    1.65 +  index-file.names += ( "index.html" )
    1.66 +  index-file.names += ( "index.php" )
    1.67 +  # Last but not least...
    1.68 +  index-file.names += ( "/dir-generator.php" )
    1.69 +}
    1.70 +
    1.71 +## info.mirror.slitaz.org
    1.72 +##
    1.73 +#$HTTP["host"] =~ "^info\.mirror\.slitaz\.org$" {
    1.74 +#  server.document-root = "/var/www/mirror-info/"
    1.75 +#  server.errorlog = "/var/log/lighttpd/info.mirror.slitaz.org-error.log"
    1.76 +#  accesslog.filename = "/var/log/lighttpd/info.mirror.slitaz.org-access.log"
    1.77 +#  include "awstats.conf"
    1.78 +#}
    1.79 +
    1.80 +$HTTP["host"] =~ "ajaxterm\.slitaz\.org$" {
    1.81 +  proxy.server = ( "/" => 
    1.82 +  	( ( "host" => "127.0.0.1", "port" => 8022 ) )
    1.83 +  )
    1.84 +}
    1.85 +
    1.86 +# pizza.slitaz.org (Server canonical hostname)
    1.87 +#
    1.88 +$HTTP["host"] =~ "^pizza\.slitaz\.org$" {
    1.89 +  server.document-root = "/var/www/pizza"
    1.90 +  server.errorlog = "/var/log/lighttpd/pizza.slitaz.org-error.log"
    1.91 +  accesslog.filename = "/var/log/lighttpd/pizza.slitaz.org-access.log"
    1.92 +  include "awstats.conf"
    1.93 +  index-file.names += ( "index.php" )
    1.94 +}
    1.95 +
    1.96 +# slitaz.org
    1.97 +#
    1.98 +#$HTTP["host"] =~ "(^|www\.)slitaz\.org$" {
    1.99 +$HTTP["host"] =~ "www\.slitaz\.org$" {
   1.100 +  server.document-root = "/home/slitaz/website"
   1.101 +  server.errorlog = "/var/log/lighttpd/slitaz.org-error.log"
   1.102 +  accesslog.filename = "/var/log/lighttpd/slitaz.org-access.log"
   1.103 +  include "awstats.conf"
   1.104 +  
   1.105 +###  index-file.names = ( "index.html" )
   1.106 +  index-file.names += ( "start.html" )
   1.107 +  
   1.108 +  
   1.109 +###  url.rewrite-once = (
   1.110 +###    "^/about" => "/fr/about",
   1.111 +###	"^/artwork" => "/fr/artwork",
   1.112 +###	"^/devel" => "/fr/devel",
   1.113 +###    "^/doc" => "/fr/doc",
   1.114 +###	"^/get" => "/fr/get",
   1.115 +###	"^/packages" => "/fr/packages"
   1.116 +###  )
   1.117 + 
   1.118 +}
   1.119 +
   1.120 +# doc.slitaz.org
   1.121 +#
   1.122 +$HTTP["host"] =~ "doc\.slitaz\.org$" {
   1.123 +  server.document-root = "/var/www/doc"
   1.124 +  server.errorlog = "/var/log/lighttpd/doc.slitaz.org-error.log"
   1.125 +  accesslog.filename = "/var/log/lighttpd/doc.slitaz.org-access.log"
   1.126 +  index-file.names = ("doku.php")
   1.127 +  var.dokudir = ""
   1.128 +  # Rewrites for dokuwiki
   1.129 +  url.rewrite = (
   1.130 +    "^" + var.dokudir + "/lib/.*$"              => "$0",
   1.131 +     "^" + var.dokudir + "/_media/(.*)?\?(.*)$"  => var.dokudir + "/lib/exe/fetch.php?media=$1&$2",
   1.132 +     "^" + var.dokudir + "/_media/(.*)$"         => var.dokudir + "/lib/exe/fetch.php?media=$1",
   1.133 +     "^" + var.dokudir + "/_detail/(.*)?\?(.*)$" => var.dokudir + "/lib/exe/detail.php?media=$1&$2",
   1.134 +     "^" + var.dokudir + "/_detail/(.*)?$"       => var.dokudir + "/lib/exe/detail.php?media=$1",
   1.135 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)\?(.*)$" => var.dokudir + "/doku.php?do=export_$1&id=$2&$3",
   1.136 +     "^" + var.dokudir + "/_export/([^/]+)/(.*)" => var.dokudir + "/doku.php?do=export_$1&id=$2",
   1.137 +     "^" + var.dokudir + "/doku.php.*"           => "$0",
   1.138 +     "^" + var.dokudir + "/feed.php.*"           => "$0",
   1.139 +     "^" + var.dokudir + "/(.*)\?(.*)"           => var.dokudir + "/doku.php?id=$1&$2",
   1.140 +     "^" + var.dokudir + "/(.*)"                 => var.dokudir + "/doku.php?id=$1"
   1.141 +  )
   1.142 +}
   1.143 +
   1.144 +# boot.slitaz.org
   1.145 +#
   1.146 +$HTTP["host"] =~ "boot\.slitaz\.org$" {
   1.147 +  server.document-root = "/var/www/boot"
   1.148 +  server.errorlog = "/var/log/lighttpd/boot.slitaz.org-error.log"
   1.149 +  accesslog.filename = "/var/log/lighttpd/boot.slitaz.org-access.log"
   1.150 +}
   1.151 +
   1.152 +# pkgs.slitaz.org
   1.153 +#
   1.154 +$HTTP["host"] =~ "pkgs\.slitaz\.org$" {
   1.155 +  server.document-root = "/var/www/pkgs"
   1.156 +  server.errorlog = "/var/log/lighttpd/pkgs.slitaz.org-error.log"
   1.157 +  accesslog.filename = "/var/log/lighttpd/pkgs.slitaz.org-access.log"
   1.158 +  index-file.names += ( "search.sh" )
   1.159 +  cgi.assign = (
   1.160 +    ".sh" => "/bin/sh"
   1.161 +  )
   1.162 +}
   1.163 +
   1.164 +# hg.slitaz.org (Mercurial repos)
   1.165 +#
   1.166 +$HTTP["host"] =~ "hg\.slitaz\.org" {
   1.167 +  cgi.assign = (
   1.168 +    ".py" => "/usr/bin/python"
   1.169 +  )
   1.170 +  server.document-root = "/var/www/hg"
   1.171 +#  url.rewrite-once = ( "(.*)" => "/hgwebdir.py$1" )
   1.172 +  index-file.names += ( "hgwebdir.py" )
   1.173 +}
   1.174 +
   1.175 +# scn.slitaz.org (SliTaz Community Network)
   1.176 +#
   1.177 +$HTTP["host"] =~ "scn\.slitaz\.org$" {
   1.178 +  server.document-root = "/var/www/scn"
   1.179 +  server.errorlog = "/var/log/lighttpd/scn.slitaz.org-error.log"
   1.180 +  accesslog.filename = "/var/log/lighttpd/scn.slitaz.org-access.log"
   1.181 +  url.rewrite-final = (
   1.182 +    "^/system/test/(.*)$" => "/index.php?q=system/test/$1",
   1.183 +    "^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
   1.184 +    "^/([^.?]*)$" => "/index.php?q=$1",
   1.185 +    "^/rss.xml" => "/index.php?q=rss.xml"
   1.186 +  )
   1.187 +}