Edgewall Software

Changes between Version 20 and Version 21 of TracFastCgi


Ignore:
Timestamp:
Nov 16, 2005, 11:11:40 AM (18 years ago)
Author:
Jarkko Laiho
Comment:

Added section about mapping static resources with lighttpd

Legend:

Unmodified
Added
Removed
Modified
  • TracFastCgi

    v20 v21  
    116116Note that lighttpd doesn't support 'valid-user' in versions prior to 1.3.16.
    117117
     118Conditional configuration is also useful for mapping static resources, i.e. serving out images and CSS directly instead of through FastCGI:
     119{{{
     120# Aliasing functionality is needed
     121server.modules += ("mod_alias")
     122
     123# Setup an alias for the static resources
     124alias.url = ("/trac/chrome/common" => "/usr/share/trac/htdocs")
     125
     126# Use negative lookahead, matching all requests that ask for any resource under /trac, EXCEPT in
     127# /trac/chrome/common, and use FastCGI for those
     128$HTTP["url"] =~ "^/trac(?!/chrome/common)" {
     129# If you have previous fastcgi.server declarations for applications other than Trac, use += here
     130# instead of = so you won't overwrite them
     131fastcgi.server = ("/trac" =>
     132                   ("trac" =>
     133                     ("socket" => "/tmp/trac-fastcgi.sock",
     134                      "bin-path" => "/path/to/cgi-bin/trac.fcgi",
     135                      "check-local" => "disable",
     136                      "bin-environment" =>
     137                        ("TRAC_ENV" => "/path/to/projenv")
     138                     )
     139                   )
     140                 )
     141}
     142}}}
     143The technique can be easily adapted for use with multiple projects by creating aliases for each of them, and wrapping the fastcgi.server declarations inside conditional configuration blocks.
     144
    118145Other important information like [http://trac.lighttpd.net/trac/wiki/TracInstall this updated TracInstall page], [wiki:TracCgi#MappingStaticResources and this] are useful for non-fastcgi specific installation aspects.
    119146