Changeset 7829


Ignore:
Timestamp:
06/16/10 12:32:53 (2 years ago)
Author:
AaronScamehorn
Message:

Item9169: core/tools/lighttpd.pl should check for the existence of /usr/share/lighttpd/create-mime.assign.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/tools/lighttpd.pl

    r2513 r7829  
    1212my $foswiki_core = Cwd::abs_path( File::Spec->catdir( dirname(__FILE__), '..' ) ); 
    1313chomp $foswiki_core; 
    14 my $conffile = $foswiki_core . '/working/tmp/lightpd.conf'; 
     14my $conffile = $foswiki_core . '/working/tmp/lighttpd.conf'; 
     15 
     16my $mime_mapping=q(include_shell "/usr/share/lighttpd/create-mime.assign.pl"); 
     17if( ! -e  "/usr/share/lighttpd/create-mime.assign.pl" ) { 
     18$mime_mapping = q(mimetype.assign             = \( 
     19  ".rpm"          =>      "application/x-rpm", 
     20  ".pdf"          =>      "application/pdf", 
     21  ".sig"          =>      "application/pgp-signature", 
     22  ".spl"          =>      "application/futuresplash", 
     23  ".class"        =>      "application/octet-stream", 
     24  ".ps"           =>      "application/postscript", 
     25  ".torrent"      =>      "application/x-bittorrent", 
     26  ".dvi"          =>      "application/x-dvi", 
     27  ".gz"           =>      "application/x-gzip", 
     28  ".pac"          =>      "application/x-ns-proxy-autoconfig", 
     29  ".swf"          =>      "application/x-shockwave-flash", 
     30  ".tar.gz"       =>      "application/x-tgz", 
     31  ".tgz"          =>      "application/x-tgz", 
     32  ".tar"          =>      "application/x-tar", 
     33  ".zip"          =>      "application/zip", 
     34  ".mp3"          =>      "audio/mpeg", 
     35  ".m3u"          =>      "audio/x-mpegurl", 
     36  ".wma"          =>      "audio/x-ms-wma", 
     37  ".wax"          =>      "audio/x-ms-wax", 
     38  ".ogg"          =>      "application/ogg", 
     39  ".wav"          =>      "audio/x-wav", 
     40  ".gif"          =>      "image/gif", 
     41  ".jar"          =>      "application/x-java-archive", 
     42  ".jpg"          =>      "image/jpeg", 
     43  ".jpeg"         =>      "image/jpeg", 
     44  ".png"          =>      "image/png", 
     45  ".xbm"          =>      "image/x-xbitmap", 
     46  ".xpm"          =>      "image/x-xpixmap", 
     47  ".xwd"          =>      "image/x-xwindowdump", 
     48  ".css"          =>      "text/css", 
     49  ".html"         =>      "text/html", 
     50  ".htm"          =>      "text/html", 
     51  ".js"           =>      "text/javascript", 
     52  ".asc"          =>      "text/plain", 
     53  ".c"            =>      "text/plain", 
     54  ".cpp"          =>      "text/plain", 
     55  ".log"          =>      "text/plain", 
     56  ".conf"         =>      "text/plain", 
     57  ".text"         =>      "text/plain", 
     58  ".txt"          =>      "text/plain", 
     59  ".dtd"          =>      "text/xml", 
     60  ".xml"          =>      "text/xml", 
     61  ".mpeg"         =>      "video/mpeg", 
     62  ".mpg"          =>      "video/mpeg", 
     63  ".mov"          =>      "video/quicktime", 
     64  ".qt"           =>      "video/quicktime", 
     65  ".avi"          =>      "video/x-msvideo", 
     66  ".asf"          =>      "video/x-ms-asf", 
     67  ".asx"          =>      "video/x-ms-asf", 
     68  ".wmv"          =>      "video/x-ms-wmv", 
     69  ".bz2"          =>      "application/x-bzip", 
     70  ".tbz"          =>      "application/x-bzip-compressed-tar", 
     71  ".tar.bz2"      =>      "application/x-bzip-compressed-tar", 
     72  # default mime type 
     73  ""              =>      "application/octet-stream", 
     74 \)) ; 
     75} 
    1576 
    1677# write configuration file 
     
    2384) 
    2485server.port = $PORT 
    25 include_shell "/usr/share/lighttpd/create-mime.assign.pl" 
     86 
     87server.errorlog = "/scratch/foswiki/core/working/tmp/error.log" 
     88 
     89# mimetype mapping 
     90$mime_mapping 
     91 
    2692url.rewrite-repeat = ( "^/?(index.*)?\$" => "/bin/view/Main" ) 
    2793\$HTTP["url"] =~ "^/bin" { cgi.assign = ( "" => "" ) } 
Note: See TracChangeset for help on using the changeset viewer.