############################################################################### # # Lighttpd configuration for hosting.gitaar.net # ############################################################################### server.modules = ( "mod_alias", "mod_rewrite", "mod_redirect", "mod_access", "mod_status", "mod_fastcgi", "mod_cgi", "mod_compress", "mod_accesslog", "mod_auth", "mod_dirlisting" ) server.event-handler = "linux-sysepoll" server.pid-file = "/var/run/lighttpd.pid" server.username = "hosting" server.groupname = "hosting" server.bind = "217.149.194.140" server.port = 80 index-file.names = ( "index.php", "index.sf", "index.html" ) static-file.exclude-extensions = ( ".php", ".sf" ) compress.cache-dir = "/tmp/lighttpd/cache/compress/" compress.filetype = ("text/plain", "text/html") fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", "bin-path" => "/vol/software/php/bin/php-cgi", "max-procs" => 1, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "16", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "broken-scriptfilename" => "enable" ) ) ) status.status-url = "/server-status" status.config-url = "/server-config" alias.url = ( "/xcache/" => "/vol/software/xcache/admin/" ) ############################################################################## # # Global access control # ############################################################################## # Often used by PHP script for included files. url.access-deny = ( ".inc" ) # Our global password file. auth.backend = "htpasswd" auth.backend.htpasswd.userfile = "/vol/sites/passwd" # Server info is mine! auth.require = ( "/server-" => ( "method" => "basic", "realm" => "Server info", "require" => "user=mauricem" )) # Just in case we start running pmwiki on more than one site. $HTTP["url"] =~ "/wiki/(cookbook|local|wiki.d)/" { url.access-deny = ( "" ) } ############################################################################## # # SITE: secretsauce.phorum.org # ############################################################################## $HTTP["host"] =~ "(phorum-dev|secretsauce)" { $HTTP["host"] !~ "^secretsauce\.phorum\.org" { url.redirect = ( "^/(.*)" => "http://secretsauce.phorum.org/$1" ) } server.document-root = "/vol/sites/phorum-dev.gitaar.net/webroot/" accesslog.filename = "/var/log/lighttpd/secretsauce_access.log" auth.require = ( "/wiki/" => ( "method" => "basic", "realm" => "Phorum wiki", "require" => "user=thomas|user=mauricem" )) dir-listing.activate = "enable" } ############################################################################## # # SITE: chat.gitaar.net # ############################################################################## else $HTTP["host"] =~ "(irc|chat)" { $HTTP["host"] !~ "^chat\.gitaar\.net" { url.redirect = ( "^/(.*)" => "http://chat.gitaar.net/$1" ) } server.document-root = "/vol/sites/irc.gitaar.net/webroot/" accesslog.filename = "/var/log/lighttpd/chat_access.log" } ############################################################################## # # SITE: www.bluesplayer.nl # ############################################################################## else $HTTP["host"] =~ "bluesplayer" { $HTTP["host"] !~ "^bluesplayer\.gitaar\.net" { url.redirect = ( "^/(.*)" => "http://bluesplayer.gitaar.net/$1" ) } server.document-root = "/vol/sites/www.bluesplayer.nl/webroot/" accesslog.filename = "/var/log/lighttpd/bluesplayer_access.log" fastcgi.map-extensions = ( ".php3" => ".php" ) index-file.names = ( "index.php3", "index.php", "index.html" ) auth.require = ( "/guestbook/admin/" => ( "method" => "basic", "realm" => "Phorum wiki", "require" => "user=chris|user=mauricem" ), "/guestbook/config/" => ( "method" => "basic", "realm" => "Phorum wiki", "require" => "user=mauricem" ), "/guestbook/setup/" => ( "method" => "basic", "realm" => "Phorum wiki", "require" => "user=mauricem" ) ) } ############################################################################## # # SITE: www.bullfrogbluesmachine.nl # ############################################################################## else $HTTP["host"] =~ "bullfrogbluesmachine" { $HTTP["host"] !~ "^www.bullfrogbluesmachine.nl" { url.redirect = ( "^/(.*)" => "http://www.bullfrogbluesmachine.nl/$1" ) } server.document-root = "/vol/sites/www.bullfrogbluesmachine.nl/webroot/" accesslog.filename = "/var/log/lighttpd/bullfrogbluesmachine_access.log" auth.require = ( "/ewiki/" => ( "method" => "basic", "realm" => "BBM admin", "require" => "user=bbm|user=mauricem" )) } ############################################################################## # # SITE: stockenhof.gitaar.net # ############################################################################## else $HTTP["host"] =~ "stockenhof" { $HTTP["host"] !~ "^stockenhof.gitaar.net" { url.redirect = ( "^/(.*)" => "http://stockenhof.gitaar.net/$1" ) } server.document-root = "/vol/sites/stockenhof.gitaar.net/webroot/" accesslog.filename = "/var/log/lighttpd/stockenhof_access.log" auth.require = ( "/admin/" => ( "method" => "basic", "realm" => "Stockenhof admin", "require" => "user=stockenhof|user=mauricem" )) } ############################################################################## # # SITE: www.gitaar.net # ############################################################################## else $HTTP["host"] =~ ".*" { url.rewrite = ( "^/(.+\.sf)$" => "/site_frame/templateparser.php/$1" ) # Redirect to www.gitaar.net at all times. We do not allow other # hostnames for accessing, to prevent cookie problems. $HTTP["host"] !~ "^(www|dev)\.gitaar\.net" { url.redirect = ( "^/(.*)" => "http://www.gitaar.net/$1" ) } # Default server docroot overriden for the development server. $HTTP["host"] =~ "^dev\.gitaar\.net" { server.document-root = "/vol/sites/dev.gitaar.net/webroot/" } url.redirect = ( # Confirm signup. "^/cs:([^:]+):([^:]+)$" => "/site_frame/profile/signup/step3.php?username=$1&signupcode=$2", # Confirm email address change. "^/ce:([^:]+):([^:]+)$" => "/site_frame/profile/edit/confirm_email_change.php?username=$1&changecode=$2", # Leached images from the old site. Let's provide them with an image ;-) "^/forum/download" => "/images/gitaarnetpicks.gif", # Some old URLs, which I want to catch. "^/fretfinder" => "/", "^/advertenties" => "/", "^/kalender" => "/", "^/les/tab/tab_(\d)\.php$" => "http://www.gitaar.net/les/tab/tab_$1.sf", "^/wedstrijd" => "/", "^/faq27" => "/info/rules.sf", "^/faq" => "/wiki/index.php/FAQ/HomePage" ) } server.document-root = "/vol/sites/www.gitaar.net/webroot/" server.errorlog = "/var/log/lighttpd/error.log" accesslog.filename = "/var/log/lighttpd/access.log" ############################################################################## # # MIME type configuration # ############################################################################## mimetype.assign = ( ".pdf" => "application/pdf", ".sig" => "application/pgp-signature", ".spl" => "application/futuresplash", ".class" => "application/octet-stream", ".ps" => "application/postscript", ".torrent" => "application/x-bittorrent", ".dvi" => "application/x-dvi", ".gz" => "application/x-gzip", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", ".zip" => "application/zip", ".mp3" => "audio/mpeg", ".m3u" => "audio/x-mpegurl", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", ".ogg" => "application/ogg", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".asc" => "text/plain", ".c" => "text/plain", ".cpp" => "text/plain", ".log" => "text/plain", ".conf" => "text/plain", ".text" => "text/plain", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", ".wmv" => "video/x-ms-wmv", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2" => "application/x-bzip-compressed-tar" )